UNPKG

steal-tools

Version:

Futuristic build tools for ES6 Module applications.

15 lines (12 loc) 270 B
var isArray = require("lodash/isArray"); /** * Converts a value to an array * @param {*} value - The value to convert * @return {Array} */ module.exports = function arrify(value) { if (value == null) { return []; } return isArray(value) ? value : [value]; };