{"_id":"tslang-utils","_rev":"3-a60af3a83790a18491d4eab767cffd17","name":"tslang-utils","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"tslang-utils","version":"0.1.0","author":{"name":"Liu Bowen","email":"asyncmode@outlook.com"},"license":"MIT","description":"Some functional/semantic codes for TypeScript(JavaScript) development.","module":"dist/tslang-utils.esm.js","main":"dist/index.js","typings":"dist/index.d.ts","repository":{"type":"git","url":"git@github.com:lbwa/tslang-utils.git"},"private":false,"engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","format":"prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""},"peerDependencies":{},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"tsdx lint src"}},"lint-staged":{"**/*.{js,jsx,ts,tsx,json,md}":["prettier --write"]},"prettier":{"printWidth":80,"semi":false,"singleQuote":true,"trailingComma":"none","endOfLine":"crlf","tabWidth":2,"useTabs":false},"size-limit":[{"path":"dist/tslang-utils.cjs.production.min.js","limit":"10 KB"},{"path":"dist/tslang-utils.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.6.0","husky":"^4.3.0","lint-staged":"^10.4.2","size-limit":"^4.6.0","tsdx":"^0.14.1","tslib":"^2.0.3","typescript":"^4.0.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 lbwa\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"tslang-utils@0.1.0","dist":{"shasum":"a0365f23d208cbb649fff01d15a8e309e1c5e442","integrity":"sha512-xv9t8AEJHuri405nx3w4UTCHYGWEesIIJZHMsjYylB/e+xDJZAQbR71IAtuNb/jDH2LK705Rd+MPnkjjxhKneA==","tarball":"https://registry.npmjs.org/tslang-utils/-/tslang-utils-0.1.0.tgz","fileCount":22,"unpackedSize":21762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfirLhCRA9TVsSAnZWagAACBgP+gMcV/iD31E2zyx1Cabe\nRsVrhh5qp0ZLkoTYVSra7CkxiMZ00Gaj5DrZJmuENKMTx/u2mEJ4qOnzw/Hg\nBWBO66U1rkeTVXE8864cqQlje7CuJmUjtrG1ryMZF1vOWScVZ++dWMwN3Krl\nP8nV6xjqF/FNQI7w1a7b72J79Ld87LpuSvI6VhAOsRxEpdfzKvcoHNWEaLXp\nSA9KyV/2mNLkKdpKnEc5ShqVyHPt3IGzJ0Z2cByTK2aLMKWt/KGfP6elz/JA\ng9MYiovLO1X70Wi3E4oK36i3KP5Q2Safmhl6MxAM/3AHqRJa60q2zJ1Lf4oh\n12vtyOMmULVIRNBz/NHa+c3QykzqRG9In3BAHIIy7zMGbBfpyBrfYpcMpmGn\npvznInTanH9wp5ABLG+hSr6r8qnP7Ydm3ccCpR329IQ1U8RZPML5LlM+HAkw\nfSFCK/OW+QVfauTX2sJsdwgIOWRJv2SmaKLPpTcfDmi+zCfu8ZuA3SMyKqnr\nhlfKBWtC9CwV8GG3ymJsAyPhBGzSikvPAzpw6kBFN6oAmrV+E4FT01ZfRDmm\nBwwYi07EZoXd0eqRFKkiEOfbZGqchbyUsXFNBnXukC2uFUJyv8aqTCP5melv\nc0HHX1pukGANrBPo3H07YP3aYbk/5IkWV8hUXSdXs3SU90N0YnxBTClBk3X6\nBKQx\r\n=W6LY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFACvlUR+W4S0MNdmVzPIWh5gC32LiUa5bAuTGRsnjxnAiEAxY2q7j9wdHjhx4q6BIknh/vMTY0ZAnjeJsnYMDBvHKU="}]},"maintainers":[{"name":"lbwa","email":"mr_lbw@outlook.com"}],"_npmUser":{"name":"lbwa","email":"mr_lbw@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tslang-utils_0.1.0_1602925281231_0.7163958149431475"},"_hasShrinkwrap":false},"0.2.0":{"name":"tslang-utils","version":"0.2.0","author":{"name":"Liu Bowen","email":"asyncmode@outlook.com"},"license":"MIT","description":"Some functional/semantic codes for TypeScript(JavaScript) development.","module":"dist/tslang-utils.esm.js","main":"dist/index.js","typings":"dist/index.d.ts","repository":{"type":"git","url":"git@github.com:lbwa/tslang-utils.git"},"private":false,"engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","format":"prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""},"peerDependencies":{},"husky":{"hooks":{"pre-commit":"lint-staged","pre-push":"tsdx lint src"}},"lint-staged":{"**/*.{js,jsx,ts,tsx,json,md}":["prettier --write"]},"prettier":{"printWidth":80,"semi":false,"singleQuote":true,"trailingComma":"none","endOfLine":"crlf","tabWidth":2,"useTabs":false},"size-limit":[{"path":"dist/tslang-utils.cjs.production.min.js","limit":"10 KB"},{"path":"dist/tslang-utils.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.6.0","husky":"^4.3.0","lint-staged":"^10.4.2","size-limit":"^4.6.0","tsdx":"^0.14.1","tslib":"^2.0.3","typescript":"^4.0.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 lbwa\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"tslang-utils@0.2.0","dist":{"shasum":"d173da57e0c3634e38ea1f587a55172a8429a1b1","integrity":"sha512-xZKBUfD2qPPDK8olTWIFgSElSJj/sXz2jRgJ5IeWLI7FiOB3mMiwJnBN5V9aN48ubBEweBeUj0Jn3bNl7rVZdg==","tarball":"https://registry.npmjs.org/tslang-utils/-/tslang-utils-0.2.0.tgz","fileCount":24,"unpackedSize":26661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmV5iCRA9TVsSAnZWagAA1uYP/1V9dtTronCRAu5WTuK2\n+7KC+rsQVJaM7f/p+jolCZ8xJvH+epNA0ZPugtzpOc7X/YbbMfZQwzOAT5AV\nPodjc6BpnIvAv9gapdVNNcK01N8GOg8Xga35Tp12j90t6IeW1xoHGkV29+IX\noq/0mfol7DgiVV7uDiUAE0MS5c3WwFrQzGRjc1k6oNwb/rV+Em3dyLfnQnLu\n8hY35YbLZds0sXQfaKqAoB+sdkHJIeNC+TWSyL/QZCyHm9pYc4tJ9VfZpqDS\nEoX+jCwMwxRoxxBGEJfv3SsVeeK3tYUCZOvznpgqhbkSm6cWxwjGsIl5+Qj7\n9eke6SCHGEkNaVbI1gWldE3Yk6N81CV47P3oWQv/LRbokqRolOBuFTmulmyC\n4T0+EIoZZ6Q+E+SoNDZyB7ib19JBv+4DhQWGjRdfIkCRFKnIXOT4Xn+GWW5u\n84HdhU9hAadArKei8pfX0lNGebYW0hi7PbCFjkXxdLsMNj7v3qGDiEWK5yzJ\nkYoYRtczjIlNIyaJQN/7/cf+37ZcXWDxStf4kCkxj3XtqjuUdoY9TguPbW0t\nA1RsbYb+OHbntjdJXRuTZRaK4hwVEBSvisExHo2YVS1qC3LYLd4wS3beUpi9\nQmYnOj5k+qktCckJNNc5NaTJ5iU0FBzSW4ToVicL1/Q18SUemJVFQEEVOyOx\nbAvt\r\n=dJ43\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6dZkGA4VQ7wHAj2Ds7OCo0wtfKyxdy5kQjjC7lJD3mQIhAL+XiQ+Suxmg0xvEp2dWpyZyAphyUkLAxlAsAaoXaike"}]},"_npmUser":{"name":"lbwa","email":"mr_lbw@outlook.com"},"directories":{},"maintainers":[{"name":"lbwa","email":"mr_lbw@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tslang-utils_0.2.0_1620663906333_0.8760889216755694"},"_hasShrinkwrap":false},"0.3.0":{"name":"tslang-utils","version":"0.3.0","author":{"name":"Liu Bowen","email":"asyncmode@outlook.com"},"license":"MIT","description":"Some functional/semantic codes for TypeScript(JavaScript) development.","module":"dist/tslang-utils.esm.js","main":"dist/index.js","typings":"dist/index.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/lbwa/tslang-utils.git"},"private":false,"engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","format":"prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\""},"peerDependencies":{},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"**/*.{js,jsx,ts,tsx,json,md}":["prettier --write"]},"prettier":"@lbwa/prettier-config","size-limit":[{"path":"dist/tslang-utils.cjs.production.min.js","limit":"10 KB"},{"path":"dist/tslang-utils.esm.js","limit":"10 KB"}],"devDependencies":{"@lbwa/prettier-config":"^0.1.0","@size-limit/preset-small-lib":"^4.6.0","husky":"^4.3.0","lint-staged":"^10.4.2","size-limit":"^4.6.0","tsdx":"^0.14.1","tslib":"^2.0.3","typescript":"^4.0.3"},"resolutions":{"typescript":"^4.0.3"},"gitHead":"fb52592b264fb94c78ff0fde57e63c33011f8b84","bugs":{"url":"https://github.com/lbwa/tslang-utils/issues"},"homepage":"https://github.com/lbwa/tslang-utils#readme","_id":"tslang-utils@0.3.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"integrity":"sha512-59dudmSVx+Ir9QdFQ9SC4wv/WUcP9j4FzVaBSAiz9czb5mcCZXyI69iD7gFyADaC3ZE9EgCJ8pav7zk7Gy2QgQ==","shasum":"cdc43324f39a7175399db2219b0a05609c622b39","tarball":"https://registry.npmjs.org/tslang-utils/-/tslang-utils-0.3.0.tgz","fileCount":21,"unpackedSize":27000,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmoIGCRA9TVsSAnZWagAAh2UP/0oplTJZSjw6hgYUjTVV\nfmggK4ZJOpSE76fSp/IZH6z9meVp0hb6FsAxbrIvvwq2+G19LZxWUeo74Glj\nJUZHrS9gabsSu+rIDhGYc/6XgRj2PNwYKgn6pkFZulbKqxs1fGidZOIU5FrY\npYMh5ErHL46j+Ojo1hRwJJpfP89j/ic+LRWY/7oR4ccgzBilXyzOoSMsecFZ\ngzMj5onZNjEG+dUkhS4RQCBxFseamR8/TXbIILN5x7v0BK+9CwH9eo7OsBLm\nJXIO7Kq1fGS480fdL1vmIav7sRktyXBH/sW9GmQCDMoZ1VJJ1NeXmHtjzoh0\nQN8Rvuj4o7J9F0mCnMgJP68M4n8+3LOzF6M58af/nd2JjMvyj9qIoj1z8eLs\nuErcmRjpc2FBtyeoUWQv12uOYOy3+V62bs5ILYFytgl0MfCAzaVEP6uMQW6l\n4NQ6u7HrUdF9svxcVUJgFea6yP28VVKHDw61NZLcaIH7ISgiNCtHUYwZiLpY\nrF5eCXMHJ7F7zWPUeDldSbfR1iB4gAaaRX74lf2FckOMm1FQeKHcTsqmPvhG\nC60i4Ul8qKYqHXty0m9HFiszwyzYu3HD0RVdOxTGPat7IgrPWw1suwfBBCg+\n5oRaunaj64V0Lt2Qef4WbFvHkqTV+y09WV9AuYfBhk4C9pU1XD6aHkTpB4Pv\nmudI\r\n=fX+s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAyeVOCje0+5Lgf04DxM4JNQEjQniSfDRxFotMDiFWsgIhAL1ow6f8z6dtrcBRFt3OAQ2jAdiGlzHUQCvTkkyzd8bd"}]},"_npmUser":{"name":"lbwa","email":"mr_lbw@outlook.com"},"directories":{},"maintainers":[{"name":"lbwa","email":"mr_lbw@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tslang-utils_0.3.0_1620738566419_0.16774887018910167"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-17T09:01:21.231Z","0.1.0":"2020-10-17T09:01:21.336Z","modified":"2022-05-22T08:34:59.322Z","0.2.0":"2021-05-10T16:25:06.487Z","0.3.0":"2021-05-11T13:09:26.569Z"},"maintainers":[{"name":"lbwa","email":"mr_lbw@outlook.com"}],"description":"Some functional/semantic codes for TypeScript(JavaScript) development.","repository":{"type":"git","url":"git+ssh://git@github.com/lbwa/tslang-utils.git"},"author":{"name":"Liu Bowen","email":"asyncmode@outlook.com"},"license":"MIT","readme":"# tslang utils\n\nSome functional/semantic codes for TypeScript(JavaScript) development.\n\n![Pipeline](https://github.com/lbwa/tslang-utils/workflows/Pipeline/badge.svg) <img alt=\"npm (tag)\" src=\"https://img.shields.io/npm/v/tslang-utils/latest?style=flat-square\"> <img alt=\"npm bundle size\" src=\"https://img.shields.io/bundlephobia/minzip/tslang-utils?style=flat-square\">\n\n<!-- TOC -->\n\n- [tslang utils](#tslang-utils)\n  - [installation](#installation)\n  - [type checker](#type-checker)\n    - [isDef](#isdef)\n    - [isFunc](#isfunc)\n    - [isString](#isstring)\n    - [isNumber](#isnumber)\n    - [isStrictNumber](#isstrictnumber)\n    - [hasOwnProp](#hasownprop)\n  - [Env](#env)\n    - [isServer](#isserver)\n    - [isBrowser](#isbrowser)\n  - [License](#license)\n\n<!-- /TOC -->\n\n## installation\n\n```bash\n$ yarn add tslang-utils\n```\n\n## type checker\n\n### isDef\n\nWhether value isn't `undefined` or `null`.\n\n```ts\nconst a = { name: 'github user', bio: null }\n\nisDef(a.name) // true\nisDef(a.age) // false\nisDef(a.bio) // false\n```\n\n### isFunc\n\nWhether value is `Function` type\n\n```ts\nisFunc(() => {}) // true\nisFunc(true) // false\n```\n\n### isString\n\n```ts\nisString('') // true\nisString(true) // false\n```\n\n### isNumber\n\nWhether value is `Number` type. It will omit `NaN` when we set second parameter to `true`.\n\n```ts\nisNumber(0) // true\nisNumber(NaN) // true\nisNumber(NaN, true) // false\n```\n\n### isStrictNumber\n\nEquivalent to `isNumber(/* value */, true)`.\n\n### hasOwnProp\n\nWhether an object has a property with the specified name.\n\n```ts\nconst a = { name: 'github user', bio: null }\n\nhasOwnProp(a, 'name') // true\nhasOwnProp(a, 'toString') // false\n```\n\n## Env\n\n### isServer\n\nWhether current JS runtime is in the server([node.js](https://nodejs.org)) environment.\n\n```ts\nisSever() // true or false\n```\n\n### isBrowser\n\nWhether current JS runtime is in the browser environment.\n\n```ts\nisBrowser() // true or false\n```\n\n## License\n\n[MIT](./LICENSE) © [Liu Bowen](https://github.com/lbwa)\n","readmeFilename":"README.md","homepage":"https://github.com/lbwa/tslang-utils#readme","bugs":{"url":"https://github.com/lbwa/tslang-utils/issues"}}