{"_id":"@activimetrics/utils-composite","_rev":"2-e2b7c0a034b24da3ba260aa7285f264f","name":"@activimetrics/utils-composite","dist-tags":{"latest":"0.7.1"},"versions":{"0.7.0":{"name":"@activimetrics/utils-composite","version":"0.7.0","description":"Composite utilities (immutability, fp helpers)","module":"dist/index.js","main":"compat/cjs/index.js","react-native":"src/index.js","scripts":{"flow":"flow","flow-copy-source":"flow-copy-source -v src","build:clean":"rm -rfv dist compat","build:flow":"npm run flow-copy-source dist && npm run flow-copy-source compat/cjs","build:index":"create-index --banner '// @flow\n\n/*::\nexport * from \"./types\";\n*/' src/ && sed -f indexIgnore.sed -i src/index.js && npx lint:fix src/index.js","build:readme":"pkg-to-readme --template ./readmeTemplate.ejs --force && documentation readme src/** --markdown-toc false --section API && doctoc README.md","build:src":"rollup -c","build":"npm run build:clean && npm run build:index && npm run build:src && npm run build:flow && npm run build:readme","lint":"eslint --rule 'flowtype-errors/show-errors: error'","lint:fix":"npx lint --fix","npm:publish":"np","precommit":"lint-staged","version":"npm run build:index && npm run build:readme && git add README.md src/index.js","prepack":"npm run build:clean && npm run build:src && npm run build:flow"},"lint-staged":{"*.js":["npm run lint:fix","git add"]},"repository":{"type":"git","url":"git+https://github.com/jumpn/utils-composite.git"},"author":{"name":"Mauro Titimoli","email":"mauro@jumpn.com","url":"https://github.com/mgtitimoli"},"license":"MIT","bugs":{"url":"https://github.com/jumpn/utils-composite/issues"},"homepage":"https://github.com/jumpn/utils-composite#readme","keywords":["composite","array","object","fp","functional","utilities","utils"],"dependencies":{"babel-polyfill":"6.26.0","babel-runtime":"6.26.0","fast-deep-equal":"1.0.0","flow-static-land":"0.2.8"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-transform-arrow-functions":"^7.8.3","@babel/plugin-transform-async-to-generator":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/preset-flow":"^7.8.3","acorn":"^7.1.0","babel-eslint":"^10.0.3","create-index":"^2.5.0","doctoc":"^1.4.0","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^6.10.0","eslint-plugin-flowtype":"^4.6.0","eslint-plugin-flowtype-errors":"^4.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","flow-bin":"^0.118.0","flow-copy-source":"^2.0.9","flow-typed":"^3.0.0","husky":"0.14.3","lint-staged":"4.3.0","np":"2.16.1","pascal-case":"^3.1.1","pkg-to-readme":"^1.1.0","prettier":"^1.19.1","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.4","uglify":"^0.1.5","uglify-es":"^3.3.9","zen-observable":"^0.8.15"},"gitHead":"c6ef43ee22c8afd841cc2eeadeb7c389f49d2384","_id":"@activimetrics/utils-composite@0.7.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-rLu+IP7LJ8nCAq/WtkgFS4XiFXUczl+7Pq9aCJdZL8hpslbKVn3M+QVKkQkx5ojerFkWTCVrxJ4ziwhEGgLcUw==","shasum":"2cae67986f0d3c0acd0e115e6d667bbdece16922","tarball":"https://registry.npmjs.org/@activimetrics/utils-composite/-/utils-composite-0.7.0.tgz","fileCount":139,"unpackedSize":396549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTxWaCRA9TVsSAnZWagAAnJMP/i385wi47+zcJ8y+tDN7\nV4YEFFCa273l7dje+NK5o73SH3/Mg9jaXUgp/nV3ov/j6vOpIynGiGDefkm5\nZ3A3B9O90Eche3r3qFxwFAMNtMS0sODbfzKmlvoiDt+u3SLBDt84IDwhING7\ntz10FxkcAIGv2tapHSxUjBykwd7zXhIdIIlpkdCCpl8ah+ZFAk6BxqWuhRwM\nVcO3gBLASs/iT6196a3XAUZMqVnCYieKcuDjYktxb2d9KjArLDVBnXcbM/ox\nDJYGK4+jwXRuyJJiIGZmch5MqzTznSp1yZR6gqRTECidYXNYQ/RNODVTBto/\nv+2680etVKWuBJ4XTBoYj8vJrv4ii9TAHLwNMsDyDdLTOKWnwS4y2GFzVIGo\n5UW5qYayZ3MfP3LPF1KERl33vTKTqm75arrzbzRVz7nlFEfzDasAjRxsxdyF\nRDDadltHXeeASNr8eZWIHvhZK01LK5uc3QurLVDVQI4vddilB6NSaU6621PC\nmn1pJ8TUzUjsCDxpb8EErADfyJncX4UhbrlpSYf9Av7cWQMZQqRTLF2LUdXu\nxYGQzmjQQ5ZnrqqYA3kx3Rsr2Y/8E+iGDIQsOrlcpQ1yTvjZSn0KfwQpejrZ\nW1aR/N3zaFvbrmDhdASythW5iu+duT+yhbsN1U3WBbrQDuvLks+v5q6lA9xh\ng89v\r\n=w8xT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHpkh5NlOcnzy9KXzJQJ+CIDTZa0TBdy/rvXlet35JfYAiB1NKA2HcuCRcNp9xQGPWgrxPEre5k4jQBVjRUF8or1fQ=="}]},"maintainers":[{"name":"jmarca","email":"james@activimetrics.com"}],"_npmUser":{"name":"jmarca","email":"james@activimetrics.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-composite_0.7.0_1582241178354_0.24704132790078148"},"_hasShrinkwrap":false},"0.7.1":{"name":"@activimetrics/utils-composite","version":"0.7.1","description":"Composite utilities (immutability, fp helpers)","module":"dist/index.js","main":"compat/cjs/index.js","react-native":"src/index.js","scripts":{"flow":"flow","flow-copy-source":"flow-copy-source -v src","build:clean":"rm -rfv dist compat","build:flow":"npm run flow-copy-source dist && npm run flow-copy-source compat/cjs","build:index":"create-index --banner '// @flow\n\n/*::\nexport * from \"./types\";\n*/' src/ && sed -f indexIgnore.sed -i src/index.js && npm run lint:fix src/index.js","build:readme":"pkg-to-readme --template ./readmeTemplate.ejs --force && documentation readme src/** --markdown-toc false --section API && doctoc README.md","build:src":"rollup -c","build":"npm run build:clean && npm run build:index && npm run build:src && npm run build:flow && npm run build:readme","lint":"eslint --rule 'flowtype-errors/show-errors: error'","lint:fix":"npm run lint --fix","npm:publish":"np","precommit":"lint-staged","version":"npm run build:index && npm run build:readme && git add README.md src/index.js","prepack":"npm run build:clean && npm run build:src && npm run build:flow"},"lint-staged":{"*.js":["npm run lint:fix","git add"]},"repository":{"type":"git","url":"git+https://github.com/jmarca/utils-composite.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/jmarca/utils-composite/issues"},"homepage":"https://github.com/jmarca/utils-composite#readme","keywords":["composite","array","object","fp","functional","utilities","utils"],"dependencies":{"babel-polyfill":"6.26.0","babel-runtime":"6.26.0","fast-deep-equal":"1.0.0","flow-static-land":"0.2.8"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-transform-arrow-functions":"^7.8.3","@babel/plugin-transform-async-to-generator":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.8.4","@babel/preset-flow":"^7.8.3","acorn":"^7.1.0","babel-eslint":"^10.0.3","create-index":"^2.5.0","doctoc":"^1.4.0","documentation":"^12.1.4","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^6.10.0","eslint-plugin-flowtype":"^4.6.0","eslint-plugin-flowtype-errors":"^4.1.0","eslint-plugin-import":"^2.20.1","eslint-plugin-prettier":"^3.1.2","flow-bin":"^0.118.0","flow-copy-source":"^2.0.9","flow-typed":"^3.0.0","husky":"0.14.3","lint-staged":"4.3.0","np":"2.16.1","pascal-case":"^3.1.1","pkg-to-readme":"^1.1.0","prettier":"^1.19.1","rollup":"^1.31.1","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-uglify":"^6.0.4","uglify":"^0.1.5","uglify-es":"^3.3.9","zen-observable":"^0.8.15"},"gitHead":"f461f3d5e3f4f97bdc7740e547a8a85c09bf2f8b","_id":"@activimetrics/utils-composite@0.7.1","_nodeVersion":"13.7.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-qDZBkZewCP5XaLsuCx0e9cHggH4pRG1VMnmDG9I59jdzjw+j909AAvXV02AyCj2IXe7JRzGK3vAumr8GOYlKcQ==","shasum":"562227e6a565654f1802e1956ec00c68f2e637d6","tarball":"https://registry.npmjs.org/@activimetrics/utils-composite/-/utils-composite-0.7.1.tgz","fileCount":139,"unpackedSize":396875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTxhgCRA9TVsSAnZWagAA5A8P/iWTyGLQqSqsuDfk/0l7\nutEuk1W2aEuceuMHiMtLptpsQztdoRi7F8/fpoItFmy9DaMeiany/M+uccRX\nc9wWz6Gj4iFoyWjmhtcpncxAjGmj1TUvNOPP96WcJmePPPTPnWDOlcZQ45G3\nXpUpWvTEA1RjdHBvrvM9tq51V5gTGNj0uozxdpIuqrx/3dnX7fUifmxRhpnu\n2qU1m+QxEt59L/3LaEGWcE+g7KCPvCH4/ZF+X4LDL3ULjEEzuVcyLKlgf+e3\nl26vVTuUaTiZI0+aJxm2pKminv+q+oykvZ6efthyV8MJ8FNiWh4X0DTdhCXZ\n2Cut1grzKKq4Bfziaw7VvbfR5RgwEvCJd+Cx/86cO2aFNntYhinw29spmYeg\n+QikuEwaYGuMTpcfcU5xfDqrVlajmSbGtIy7JCNzhJaaEIxOq/qSkrpFo5qd\njyjEUQyP0yC17Or0mnjbLb058HlW7JJp+DoeOOiBLyYufGFwiIGnV9NXlBa+\nJMUzpQ/XfWdkdJgXfNxiWg62TCbon04MZ4LFys7f8QBgRK7QCihYryg7sPWq\nOxpXy0ipBuGZ8T9dImisAnQFfVfE6gG6z86TXS+bLaKUGAsvrLzKlsdJZ6vE\nN4mfHXdqqSjhrYXpi2Gw9IXOaWpMZ+US++ZDq2cawMefDkugcoUYrJIZSqZ6\n/90c\r\n=PM7r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQo2LaFwRTMm6feZ7B8BgW+sagimK18Q2kvpyTtc4X3wIhAMw7SxeFVT43zfCvEu6pRfxERBDlEh6ZKrglWEktUcYg"}]},"maintainers":[{"name":"jmarca","email":"james@activimetrics.com"}],"_npmUser":{"name":"jmarca","email":"james@activimetrics.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/utils-composite_0.7.1_1582241887643_0.10115474775249211"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-20T23:26:18.136Z","0.7.0":"2020-02-20T23:26:18.454Z","modified":"2022-04-04T11:19:50.758Z","0.7.1":"2020-02-20T23:38:07.750Z"},"maintainers":[{"name":"jmarca","email":"james@activimetrics.com"}],"description":"Composite utilities (immutability, fp helpers)","homepage":"https://github.com/jmarca/utils-composite#readme","keywords":["composite","array","object","fp","functional","utilities","utils"],"repository":{"type":"git","url":"git+https://github.com/jmarca/utils-composite.git"},"bugs":{"url":"https://github.com/jmarca/utils-composite/issues"},"license":"MIT","readme":"# @activimetrics/utils-composite\n\n> Composite utilities (immutability, fp helpers)\n>\n> **NOTE**: All the functions described in [API](#API) are curried\n>\n> **NOTE**: forked from jumpn/utils-composite in order to upgrade dependencies\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<!-- END doctoc -->\n\n- [Installation](#installation)\n  - [Using npm](#using-npm)\n  - [Using yarn](#using-yarn)\n- [Types](#types)\n- [API](#api)\n  - [get](#get)\n    - [Parameters](#parameters)\n  - [getIn](#getin)\n    - [Parameters](#parameters-1)\n  - [getKeys](#getkeys)\n    - [Parameters](#parameters-2)\n  - [hasIn](#hasin)\n    - [Parameters](#parameters-3)\n  - [hasKey](#haskey)\n    - [Parameters](#parameters-4)\n  - [haveSameProps](#havesameprops)\n    - [Parameters](#parameters-5)\n  - [is](#is)\n    - [Parameters](#parameters-6)\n  - [isEmpty](#isempty)\n    - [Parameters](#parameters-7)\n  - [map](#map)\n    - [Parameters](#parameters-8)\n  - [arrayRemove](#arrayremove)\n    - [Parameters](#parameters-9)\n  - [remove](#remove)\n    - [Parameters](#parameters-10)\n  - [removeIn](#removein)\n    - [Parameters](#parameters-11)\n  - [set](#set)\n    - [Parameters](#parameters-12)\n  - [setIn](#setin)\n    - [Parameters](#parameters-13)\n  - [shallowCopy](#shallowcopy)\n    - [Parameters](#parameters-14)\n  - [shallowEqual](#shallowequal)\n    - [Parameters](#parameters-15)\n  - [toUndefinedIfEmpty](#toundefinedifempty)\n    - [Parameters](#parameters-16)\n  - [updateIn](#updatein)\n    - [Parameters](#parameters-17)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\n### Using [npm](https://docs.npmjs.com/cli/npm)\n\n    $ npm install --save @activimetrics/utils-composite\n\n### Using [yarn](https://yarnpkg.com)\n\n    $ yarn add @activimetrics/utils-composite\n\n## Types\n\n```flowtype\ntype Composite = Array<*> | Object;\n\ntype Key = number | string;\n\ntype Path = Array<Key>;\n```\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### get\n\nGet property value of given key.\n\n#### Parameters\n\n-   `key` **Key** \n-   `composite` **Composite** \n\nReturns **any** \n\n### getIn\n\nReturns value located at the given path or undefined otherwise.\n\n#### Parameters\n\n-   `path` **Path** \n-   `composite` **Composite** \n\nReturns **any** \n\n### getKeys\n\nGet own enumerable keys.\n\n#### Parameters\n\n-   `composite` **Composite** \n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;Key>** \n\n### hasIn\n\nReturns true if value located at given path is deeply equal to the one\nspecified.\n\n#### Parameters\n\n-   `path` **Path** \n-   `value` **any** \n-   `composite` **Composite** \n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### hasKey\n\nReturns true if key is included in composite's own enumerable ones,\nor false otherwise.\n\n#### Parameters\n\n-   `key` **Key** \n-   `composite` **Composite** \n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### haveSameProps\n\nReturns true if both composites have the same props or false otherwise.\n\n#### Parameters\n\n-   `c1` **Composite** \n-   `c2` **Composite** \n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### is\n\nReturns true if parameter is a Composite or false otherwise\n\n#### Parameters\n\n-   `thing` **any** \n\n### isEmpty\n\nReturns true if composite has no own enumerable keys (is empty) or false\notherwise\n\n#### Parameters\n\n-   `composite` **Composite** \n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### map\n\nMaps values of the given composite using mapper\n\n#### Parameters\n\n-   `mapper` **function (value: any, key: Key, composite: $Supertype&lt;C>): any** \n-   `composite` **C** \n\nReturns **$Supertype&lt;C>** \n\n### arrayRemove\n\nReturns a new Array with the result of having removed the specified amount\n(count) of elements at the given index.\n\n#### Parameters\n\n-   `index` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n-   `count` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n-   `array` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Element](https://developer.mozilla.org/docs/Web/API/Element)>** \n\nReturns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Element](https://developer.mozilla.org/docs/Web/API/Element)>** \n\n### remove\n\nReturns a new composite with the result of having removed the property with\nthe given key.\n\n#### Parameters\n\n-   `key` **Key** \n-   `composite` **Composite** \n\nReturns **Composite** \n\n### removeIn\n\nReturns a new composite with the result of having removed the property\nlocated at the given path.\n\n(This does the same as calling **updateIn** with updater:\n`() => updateIn.remove`)\n\n#### Parameters\n\n-   `path` **Path** \n-   `composite` **Composite** \n\nReturns **Composite** \n\n### set\n\nReturns a new composite with the result of having updated the property with\nthe given key with the specified value.\n\n#### Parameters\n\n-   `key` **Key** \n-   `value` **any** \n-   `composite` **Composite** \n\nReturns **Composite** \n\n### setIn\n\nReturns a new composite with the result of having updated the property\nlocated at the given path with the specified value.\n\n(This does the same as calling **updateIn** with updater: `() => value`)\n\n#### Parameters\n\n-   `path` **Path** \n-   `value` **any** \n-   `composite` **Composite** \n\nReturns **Composite** \n\n### shallowCopy\n\nReturns a new composite with the same own enumerable props of the one given.\n\n#### Parameters\n\n-   `composite` **C** \n\nReturns **C** \n\n### shallowEqual\n\nReturns true if both composites are of the same type (Array or Object) and\ntheir properties are strictly equal.\n\n#### Parameters\n\n-   `c1` **Composite** \n-   `c2` **Composite** \n\nReturns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** \n\n### toUndefinedIfEmpty\n\nReturns given composite if it has any own enumerable keys (is not empty) or\nundefined otherwise\n\n#### Parameters\n\n-   `composite` **Composite** \n\nReturns **Composite** \n\n### updateIn\n\nReturns a new composite with the result of having updated the property value\nat the given path with the result of the call to updater function.\n\nEntry removal is supported by returning `updateIn.remove` symbol on updater\nfunction.\n\n#### Parameters\n\n-   `path` **Path** \n-   `updater` **function (prev: any): any** \n-   `composite` **Composite** \n\nReturns **Composite** \n\n## License\n\n[MIT](LICENSE.txt) :copyright: 2020 **James Marca** /  (),  2017 **Jumpn Limited**\n","readmeFilename":"README.md"}