{"name":"toxic-utils","version":"0.3.0-alpha.1","description":"utils","main":"lib/index.js","module":"lib/index.mjs","jsnext:main":"lib/index.mjs","browser":"lib/index.browser.js","scripts":{"test":"jest --coverage","start":"jest --coverage --watch","lint":"tslint -c ./tslint.json 'src/**/*.ts' --fix && eslint ./ --fix","precommit":"npm run lint","prepush":"npm run test","build":"tsc --emitDeclarationOnly true --outDir ./lib && npm run b-common && npm run b-es && npm run b-umd && npm run b-min","b-common":"rollup -c build/rollup.config.common.js","b-es":"rollup -c build/rollup.config.es.js","b-umd":"rollup -c build/rollup.config.umd.js","b-min":"rollup -c build/rollup.config.min.js","doc":"documentation readme  src/index.js --section=doc --github=true --project-version=true"},"repository":{"type":"git","url":"git+https://github.com/toxic-johann/toxic-utils.git"},"keywords":["utils"],"author":{"name":"toxic-johann"},"license":"MIT","bugs":{"url":"https://github.com/toxic-johann/toxic-utils/issues"},"homepage":"https://github.com/toxic-johann/toxic-utils#readme","devDependencies":{"@types/lodash":"^4.14.116","babel-eslint":"^8.2.6","babel-jest":"^23.4.2","babel-plugin-lodash":"^3.3.4","babel-plugin-transform-runtime":"^6.23.0","babel-preset-env":"^1.7.0","babel-preset-es2015-rollup":"^3.0.0","babel-preset-latest":"^6.24.1","documentation":"^8.1.2","eslint":"^5.4.0","eslint-config-egg":"^7.1.0","eslint-plugin-jest":"^21.22.0","husky":"^0.14.3","jest":"^23.5.0","rollup":"^0.65.0","rollup-plugin-babel":"^3.0.7","rollup-plugin-commonjs":"^9.1.6","rollup-plugin-includepaths":"^0.2.3","rollup-plugin-node-resolve":"^3.3.0","rollup-plugin-typescript":"^0.8.1","rollup-plugin-uglify":"^4.0.0","ts-jest":"^23.1.4","tslint":"^5.11.0","typescript":"^3.0.1"},"jest":{"modulePaths":["src"],"moduleDirectories":["node_modules"],"transform":{"^.+\\.tsx?$":"ts-jest",".*":"babel-jest"},"moduleFileExtensions":["ts","tsx","js","jsx","json","node"]},"dependencies":{"babel-runtime":"^6.26.0","lodash":"^4.17.10"},"readme":"# toxic-utils\n\n[![Build Status](https://img.shields.io/travis/toxic-johann/toxic-utils/master.svg?style=flat-square)](https://travis-ci.org/toxic-johann/toxic-utils.svg?branch=master)\n[![Coverage Status](https://img.shields.io/coveralls/toxic-johann/toxic-utils/master.svg?style=flat-square)](https://coveralls.io/github/toxic-johann/toxic-utils?branch=master)\n[![npm](https://img.shields.io/npm/v/toxic-utils.svg?colorB=brightgreen&style=flat-square)](https://www.npmjs.com/package/toxic-utils)\n[![dependency Status](https://david-dm.org/toxic-johann/toxic-utils.svg)](https://david-dm.org/toxic-johann/toxic-utils)\n[![devDependency Status](https://david-dm.org/toxic-johann/toxic-utils/dev-status.svg)](https://david-dm.org/toxic-johann/toxic-utils?type=dev)\n\nutils collection\n\n## get started\n\n```shell\nnpm install toxic-utils --save\n```\n\nif you are using `flow`, you should import our flow defination, by adding this to your `.flowconfig`.\n\n```ya\n[ignore]\n\n[include]\n\n[libs]\n./node_modules/toxic-utils/lib/index.flow.js\n[options]\n\n[lints]\n```\n\n## doc\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### genTraversalHandler\n\n[src/index.js:8-20](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L8-L20 \"Source code on GitHub\")\n\nthe handler to generate an deep traversal handler\n\n**Parameters**\n\n-   `fn` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the function you wanna run when you reach in the deep property\n\nReturns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the handler\n\n### deepClone\n\n[src/index.js:27-32](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L27-L32 \"Source code on GitHub\")\n\ndeeply clone an object\n\n**Parameters**\n\n-   `source` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \\| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** if you pass in other type, it will throw an error\n\nReturns **clone-target** the new Object\n\n### deepAssign\n\n[src/index.js:38-50](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L38-L50 \"Source code on GitHub\")\n\nmerge multiple objects\n\n**Parameters**\n\n-   `args` **...[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** [description]\n\nReturns **merge-object** [description]\n\n### camelize\n\n[src/index.js:57-63](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L57-L63 \"Source code on GitHub\")\n\ncamelize any string, e.g hello world -> helloWorld\n\n**Parameters**\n\n-   `str` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** only accept string!\n-   `isBig` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** \n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** camelize string\n\n### hypenate\n\n[src/index.js:69-71](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L69-L71 \"Source code on GitHub\")\n\nhypenate any string e.g hello world -> hello-world\n\n**Parameters**\n\n-   `str` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** only accept string\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### bind\n\n[src/index.js:78-90](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L78-L90 \"Source code on GitHub\")\n\nbind the function with some context. we have some fallback strategy here\n\n**Parameters**\n\n-   `fn` **[function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** the function which we need to bind the context on\n-   `context` **any** the context object\n\nReturns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** \n\n### uuid\n\n[src/index.js:95-97](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L95-L97 \"Source code on GitHub\")\n\ngenerate an uuid\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### S4\n\n[src/index.js:101-103](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L101-L103 \"Source code on GitHub\")\n\ngenerate an random number which length is 4\n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### rand\n\n[src/index.js:108-114](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L108-L114 \"Source code on GitHub\")\n\ngenerate an random number with specific length\n\n**Parameters**\n\n-   `length` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** \n\nReturns **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n### getDeepProperty\n\n[src/index.js:119-147](https://github.com/toxic-johann/toxic-utils/blob/2b6844986d149e8d81d0c29eb28c4d5a2b92e5f6/src/index.js#L119-L147 \"Source code on GitHub\")\n\nget an deep property\n\n**Parameters**\n\n-   `obj` **any** \n-   `keys` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>)** \n-   `$2` **any**  (optional, default `{}`)\n    -   `$2.throwError`   (optional, default `false`)\n    -   `$2.backup`  \n","readmeFilename":"README.md","gitHead":"a65b3203eb4c55ed9225551a0dafd8d1a4e3e0a2","_id":"toxic-utils@0.3.0-alpha.1","_npmVersion":"6.3.0","_nodeVersion":"10.2.1","_npmUser":{"name":"toxicjohann","email":"353904974@qq.com"},"dist":{"integrity":"sha512-zSnAJOs36VQMW37BE+L2GruYgJp4nCi3cxuBTWDRQwh3I0NKzh/PwlTnWR3LH4OGZ5VtdNRX6iTSKFhahP03OA==","shasum":"4b62619de4946f2d95e17697b46fd512a1bfb1f6","tarball":"http://registry-npm.ywwl.com/toxic-utils/download/toxic-utils-0.3.0-alpha.1.tgz","fileCount":17,"unpackedSize":46410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbgq8YCRA9TVsSAnZWagAAVXgQAIJHSZMGd975JevNIxpw\nfuHlSU8iMhjvuogSqrLj+aTvH1Frn4uBxlZD8DuExRdKsmCSUysG3pscaH5j\nNBZZUsQkm5PAdYbMtoqyNDTOx0Im0kEOkD2EOZL8Yby3+yo2fSp0XDZObUcI\nFqof3I9m7yGWJ/yUXea2x1ntXta6+uqI6StK+2lBd6/TjQaE/1LHAi/TNniI\nL5GOCP9t4fHLONtVzwRpAoVQI50FJgn8DYD3abwotCHTmT0Lmc5/LxKG4AgO\n7UUnn6W9UBzZ7bg5bXFOCuBxIX+++rS55jYMQjApdEQC3910cR0Aad1UQ2Xf\nklJLEhOMZ5/iBUikOjVah1b75DWCJ+iWpXni6moGXmDESBCX8GoDRlQe/yVu\nm0Kbox8C4/v5VIjWpSIjAySQeN53cj7BaTLyWAbw9QggGF3e0vEGKWJHa8do\nfyz5kJUM/uOi4059EpOAacodYLkGXRRRqQaVQXxHXwLNRSfeF1Y4tFtJrkkn\nFg763VYe8utKTkrTfB93uILe8s+sTixoPvJhA7jbXH9zoJvAIVdgZ5RXTpof\nGxvCFDmKOFriD0l1NC56ldJ4Gm6Amu1SqmYRU22/1jQXHDdVQifV2F9Xq1sX\nlKkHta61noftZsPHJHJNk5Synqrv/UO/Q+xxLWfO1b6dFQjs8xnd43sl8WNr\nRJ3e\r\n=4jUG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA3UHE24Hq/fNr2FpuHMjnHcQujOjUvSnElsj717skqhAiEAvuPywPOftM3gYuU/JOCGlTO1zbEp7mKUuB6NCZSX+uc="}],"size":10426,"noattachment":false,"key":"/toxic-utils/-/toxic-utils-0.3.0-alpha.1.tgz"},"maintainers":[{"name":"toxicjohann","email":"353904974@qq.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toxic-utils_0.3.0-alpha.1_1535291159699_0.7280943544239231"},"_hasShrinkwrap":false,"publish_time":1535291159792,"_cnpm_publish_time":1535291159792,"dist-tags":{"beta":"0.3.0-alpha.1","latest":"0.4.3"}}