immutadot-lodash

1.0.0 • Public • Published

immutadot logo

immutad●t-lodash

immutadot-lodash is an extension to immutad●t, adding functions based on lodash.

More information on immutad●t is available on the repository's main page.

Installation

immutad●t-lodash is available on npm repository.

using yarn:

$ yarn add immutadot lodash immutadot-lodash

using npm:

$ npm install immutadot lodash immutadot-lodash

Usage

ES modules:

import { mapValues } from 'immutadot-lodash'

CommonJS:

const { mapValues } = require('immutadot-lodash')

Example

Use lodash's mapValues on a nested object:

const obj = {
  nested: {
    object: {
      a: 1,
      b: 2,
      c: 3,
    },
  },
}
 
const newObj = mapValues(obj, 'nested.object', v => v * v)
// =>
// {
//   nested: {
//     object: {
//       a: 1,
//       b: 4,
//       c: 9,
//     },
//   },
// }

Documentation

Latest API documentation is available here.

License

immutad●t-lodash is MIT licensed.

Package Sidebar

Install

npm i immutadot-lodash

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

73.7 kB

Total Files

59

Last publish

Collaborators

  • nicolas.lepage