diff options
Diffstat (limited to 'node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js')
-rw-r--r-- | node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js b/node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js new file mode 100644 index 000000000..d56ea9c5d --- /dev/null +++ b/node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js @@ -0,0 +1,27 @@ +var isFunction = require('../lang/isFunction'); + +/** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from those provided. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the new array of filtered property names. + */ +function baseFunctions(object, props) { + var index = -1, + length = props.length, + resIndex = -1, + result = []; + + while (++index < length) { + var key = props[index]; + if (isFunction(object[key])) { + result[++resIndex] = key; + } + } + return result; +} + +module.exports = baseFunctions; |