Skip to content

Most of the used mostly everywhere utils: `extend-shallow`, `isobject`, `is-extendable` (dependency of `extend-shallow`), `isarray` and `arrayify` (using `lazy-arrayify` package), all of them `lazy-cache`d.

License

Notifications You must be signed in to change notification settings

tunnckoCore/lazy-utils

Repository files navigation

Most used utils, almost everywhere - lazy-cached. Including simple arrayify, isobject, isarray, is-buffer, is-extendable and extend-shallow.

code climate standard code style travis build status coverage status dependency status

Install

npm i lazy-utils --save

Usage

For more use-cases see the tests

const lazyUtils = require('lazy-utils')

Extend object a with the properties of object b. 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}

Related

Contributing

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.

tunnckoCore.tk keybase tunnckoCore tunnckoCore npm tunnckoCore twitter tunnckoCore github

About

Most of the used mostly everywhere utils: `extend-shallow`, `isobject`, `is-extendable` (dependency of `extend-shallow`), `isarray` and `arrayify` (using `lazy-arrayify` package), all of them `lazy-cache`d.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published