{"_id":"@abramstyle/kl-utils","_rev":"8-c6eea04532623e433bccb976f655ff5b","name":"@abramstyle/kl-utils","time":{"modified":"2022-06-12T14:15:14.242Z","created":"2018-01-16T07:36:36.416Z","0.8.0":"2018-01-16T07:36:36.416Z","0.8.1":"2018-01-17T09:23:36.730Z","0.8.2":"2018-01-18T12:55:53.841Z"},"maintainers":[{"email":"abram.style@gmail.com","name":"abramstyle"}],"dist-tags":{"latest":"0.8.2"},"versions":{"0.8.1":{"name":"@abramstyle/kl-utils","version":"0.8.1","description":"A light weight javascript utilities to operate object, arrays and another data types.","main":"dist/kl-utils.js","repository":{"type":"git","url":"https://github.com/abramstyle/kl-utils"},"author":{"name":"Abram.Zhao","email":"abram.style@gmail.com"},"scripts":{"build":"webpack -p","test":"jest"},"license":"MIT","devDependencies":{"babel-eslint":"^8.0.1","babel-loader":"^7.1.2","babel-preset-env":"^1.6.1","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.7.0","jest":"^21.2.1","webpack":"^3.8.1"},"dependencies":{"change-case":"^3.0.1"},"_id":"@abramstyle/kl-utils@0.8.1","dist":{"shasum":"998f50f15ec170f170f1f91cad95ed1f7dd4220e","tarball":"https://registry.npmjs.org/@abramstyle/kl-utils/-/kl-utils-0.8.1.tgz","integrity":"sha512-bTF/sZPo2tkPIIKGswECNWkWp2JjaCrhCrpC1HeUR3OYBtuk8rcxmp3M9l7O8HMXBJdwsSrzzLSzzpCtwenQAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDLahKrAaAaJzYsO0BHOgDlHqRUOPtfbOzoMJN/v3KHIAiA3WcmfElNu24uRtLQOhAi2uacTwJAxz9ewMs23/bjzBw=="}]},"maintainers":[{"email":"abram.style@gmail.com","name":"abramstyle"}],"_npmUser":{"name":"abramstyle","email":"abram.style@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kl-utils-0.8.1.tgz_1516181015060_0.7949365077074617"},"deprecated":"dont use it"},"0.8.2":{"name":"@abramstyle/kl-utils","version":"0.8.2","description":"A light weight javascript utilities to operate object, arrays and another data types.","main":"dist/kl-utils.js","repository":{"type":"git","url":"git+https://github.com/abramstyle/kl-utils.git"},"author":{"name":"Abram.Zhao","email":"abram.style@gmail.com"},"scripts":{"build":"webpack -p","test":"jest"},"license":"MIT","devDependencies":{"babel-eslint":"^8.0.1","babel-loader":"^7.1.2","babel-preset-env":"^1.6.1","eslint":"^4.9.0","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.7.0","jest":"^21.2.1","webpack":"^3.8.1"},"dependencies":{"change-case":"^3.0.1"},"gitHead":"e4b18baa54ca9f97b46da5a007495267aab6a16f","bugs":{"url":"https://github.com/abramstyle/kl-utils/issues"},"homepage":"https://github.com/abramstyle/kl-utils#readme","_id":"@abramstyle/kl-utils@0.8.2","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"abramstyle","email":"abram.style@gmail.com"},"dist":{"integrity":"sha512-IEsOkzJCbO86WLeHzI+R1UP+InLV+isOzvn44B2vfGOYgYIBxpPVogw+tmCqZKKkjmJofcov+clQuivqOHP5fg==","shasum":"4f71c48a09a73ea888c2ceee2f3f7b1ad4561a26","tarball":"https://registry.npmjs.org/@abramstyle/kl-utils/-/kl-utils-0.8.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLBDZPw2615armh3aSO6VCLWbmTlwP7y3StzSdpSokAQIhAIEVTOgbdStX7xIIZbbS8HdFOQUEWo1jNDqjdgUqs1Cv"}]},"maintainers":[{"email":"abram.style@gmail.com","name":"abramstyle"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/kl-utils-0.8.2.tgz_1516280153768_0.6241238813381642"},"deprecated":"dont use it"}},"readme":"# kl-utils\n\nA light weight javascript utilities to operate object, arrays and another data types.\n\n# Usage\n```js\nimport {objectUtils} from '@kl/utils';\n\nobjectUtils.isObject({a: 1});\n```\n\n# Types\n## default\n### `isSameType(item, otherItem)`\ncheck if two item is same type\n## Array\n### `uniq(array)`\nreceive an array, and return array that just contains uniq item.\n### `merge(...arrays)`\nmerge arrays, if two item has same id, them quantity will be merged.\n### `contains(array, condition)`\ncheck if an array contains a item that has specified condition.\n### `findOne(array, condition)`\nfind object that match specified condition.\n### `flatten(arrays)`\nflatten array. it a shallow flatten.\n### `getIndexByProp(arrays, props = {})`\nfind index that matched specified condition.\n### `isEqual(array, otherArray)`\ncheck it two arrays is same. it uses deep compare.\n### `grouping(items, key = 'id')`\nreturn a group that match specified condition.\n## Cookie\n### `parseCookie(cookieString)`\nparse cookie that from headers 'set-cookie', it returns an object.\n## Object\n### `getKeys(object)`\nreturn all iterable keys from object\n### `isObject(object)`\ncheck if item is object, especially typeof null is object.\n### `contains(object, otherObject)`\ncheck if object contains specified object keys and them value are equals too.\n### `hasKey(object, key)`\nreturn all iterable keys of object.\n### `isItem(object)`\ncheck if object is productItem(has \"id\" and \"quantity\" attributes)\n### `isEqualItem(item, otherItem)`\ncheck if two items has same id\n### `isSame(object, otherObject)`\ncheck if two items has same shape.\n### `isEqual(object, otherObject)`\ncheck if two object is equal, it uses deep compare.\n### `toCamelCase(object)`\nconvert all keys to camelCase recursively\n### `toJSON(object, camelCase = true)`\nconvert object to json. default to camelCase\n## String\n### `isString(string)`\ncheck if given item is string.\n### `camelCase()`\nreturn a function that convert string to camelCase.\n### `toParamCase(string)`\nreturn a string to param case\n## Url\n### `getFriendlyUrl(urlString)`\nreturn a friendly url that replace all space to dash.\n### `getQueryObject(search)`\nparse query string from url.\n### `mergeQueryString(urlstring, queryObject)`\nmerge a queryObject to url. if some query already exists, new query will be appended to url.\n### `parseUrl(urlString)`\nparse url object from url string. query will be parsed to an object too.\n","readmeFilename":"README.md","description":"A light weight javascript utilities to operate object, arrays and another data types.","repository":{"type":"git","url":"git+https://github.com/abramstyle/kl-utils.git"},"author":{"name":"Abram.Zhao","email":"abram.style@gmail.com"},"license":"MIT","homepage":"https://github.com/abramstyle/kl-utils#readme","bugs":{"url":"https://github.com/abramstyle/kl-utils/issues"}}