Most used utils, almost everywhere - lazy-cached. Including simple arrayify, isobject, isarray, is-buffer, is-extendable and extend-shallow.
npm i lazy-utils --save
For more use-cases see the tests
const lazyUtils = require('lazy-utils')
Extend object
a
with the properties of objectb
. See extend-shallow for more.
Params
a
{Mixed}b
{Mixed}returns
{Object}
See is-extendable for more.
Params
val
{Mixed}returns
{Boolean}
See lazy-arrayify or isarray for more.
Params
val
{Mixed}returns
{Boolean}
Returns true if the value is an object and not an array or null. See isobject for more.
Params
val
{Mixed}returns
{Boolean}
Returns true if the value is a buffer. See is-buffer for more.
Params
val
{Mixed}returns
{Boolean}
Arrayify. Returns empty array on falsey values. See lazy-arrayify for more.
Params
val
{Mixed}returns
{Array}
Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. See mixin-deep for more.
Params
a
{Mixed}b
{Mixed}c
{Mixed}returns
{Object}
- ansi-colors: Collection of ansi colors and styles. | homepage
- extend-shallow: Extend an object with the properties of additional objects. node.js/javascript util. | homepage
- is-extendable: Returns true if a value is any of the object types: array… more | [homepage](https://github.com/jonschlinkert/is-extendable "Returns true if a value is any of the object types: array, regexp, plain object, function or date. This is useful for determining if a value can be extended, e.g. "can the value have keys?"")
- isarray: Array#isArray for older browsers | homepage
- isobject: Returns true if the value is an object and not an array… more | homepage
- lazy-arrayify: We are lazy, also lazy-cached and browserify-ready - just arrayify, falsey values… more | homepage
- lazy-chalk: Lazily load chalk, since it takes so long to load. | homepage
- lazy-globby: Lazily require globby, since it takes so long to load (because of… more | homepage
- limon-prev-next: Plugin for limon pluggable lexer that adds
prev
andnext
methods. | homepage - limon: The pluggable JavaScript lexer. Limon = Lemon. | homepage
- postjson: Transforming JSON with plugins. | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.