stuff
This commit is contained in:
parent
bc92231240
commit
b8225c639e
11904 changed files with 1472749 additions and 133 deletions
21
node_modules/@marp-team/marpit/lib/helpers/wrap_array.js
generated
vendored
Normal file
21
node_modules/@marp-team/marpit/lib/helpers/wrap_array.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.wrapArray = exports.default = void 0;
|
||||
/** @module */
|
||||
/**
|
||||
* Wrap value in array if it is not an array.
|
||||
*
|
||||
* @function wrapArray
|
||||
* @param {*} valOrArr
|
||||
* @return {Array}
|
||||
*/
|
||||
const wrapArray = valOrArr => {
|
||||
if (valOrArr == null || valOrArr === false) return [];
|
||||
if (valOrArr instanceof Array) return valOrArr;
|
||||
return [valOrArr];
|
||||
};
|
||||
exports.wrapArray = wrapArray;
|
||||
var _default = exports.default = wrapArray;
|
||||
Loading…
Add table
Add a link
Reference in a new issue