{"name":"ts-is-defined","version":"2.0.1","description":"Typescript utilities","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/dts/index.d.ts","exports":{".":{"require":"./dist/cjs/index.js","import":"./dist/esm/index.js"},"./package.json":"./package.json"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"preversion":"npm run lint && npm run build","postversion":"git push && git push --tags","build:dts":"tsc -p configs/tsconfig.dts.json","build:esm":"tsc -p configs/tsconfig.esm.json","build:cjs":"tsc -p configs/tsconfig.cjs.json","build":"rm -rf dist && mkdir dist && npm run build:dts && npm run build:esm && npm run build:cjs","lint":"tslint -p . && tslint test/*","watch":"tsc -p . -w"},"keywords":["typescript","assert"],"author":{"name":"iyegoroff","email":"iegoroff@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/iyegoroff/ts-is-defined/issues"},"homepage":"https://github.com/iyegoroff/ts-is-defined#readme","repository":{"type":"git","url":"git+https://github.com/iyegoroff/ts-is-defined.git"},"devDependencies":{"tslint":"^6.1.3","tslint-config-standard":"^9.0.0","typescript":"^4.4.4"},"dependencies":{"ts-tiny-invariant":"^1.0.3"},"gitHead":"406dbc35bacd5e8d3a43285908a99de5850ca205","_id":"ts-is-defined@2.0.1","_nodeVersion":"16.12.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-RBsSsQPkNztz2cLkFEgG24TAjl8XI4+EG+8QWuraGNGIPKA6Bz5URWkubN8XxgrpfOSgvYAvSsTDmJBDEzjjLg==","shasum":"38dcf80d08715b80edf1f5337e26f78a11eec3c5","tarball":"http://registry-npm.ywwl.com/ts-is-defined/download/ts-is-defined-2.0.1.tgz","fileCount":9,"unpackedSize":5526,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBjjGjPS2x0IFp8G0T0QSN4c1ss/jShDcRuXO7nUS34WAiEA4aaK+iMJq6OqcY3KV7xNQHXTJ2ZGQbq6xxtJVsISHtM="}],"size":2311,"noattachment":false,"key":"/ts-is-defined/-/ts-is-defined-2.0.1.tgz"},"_npmUser":{"name":"iyegoroff","email":"iegoroff@gmail.com"},"directories":{},"maintainers":[{"name":"iyegoroff","email":"iegoroff@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-is-defined_2.0.1_1635541865866_0.3399477550618366"},"_hasShrinkwrap":false,"readme":"# ts-is-defined\n\n[![npm](https://img.shields.io/npm/v/ts-is-defined)](https://npm.im/ts-is-defined)\n[![build](https://github.com/iyegoroff/ts-is-defined/workflows/build/badge.svg)](https://github.com/iyegoroff/ts-is-defined/actions/workflows/build.yml)\n[![publish](https://github.com/iyegoroff/ts-is-defined/workflows/publish/badge.svg)](https://github.com/iyegoroff/ts-is-defined/actions/workflows/publish.yml)\n![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/ts-is-defined)\n[![Bundlephobia](https://img.shields.io/bundlephobia/minzip/ts-is-defined?label=min+gzip)](https://bundlephobia.com/package/ts-is-defined)\n[![npm](https://img.shields.io/npm/l/ts-is-defined.svg?t=1495378566925)](https://www.npmjs.com/package/ts-is-defined)\n\n<!-- [![Bundlephobia](https://badgen.net/bundlephobia/minzip/ts-is-defined?label=min+gzip)](https://bundlephobia.com/package/ts-is-defined) -->\n\nTypescript utilities\n\n```ts\nexport function isDefined<T>(value: T): value is NonNullable<T> {\n  return value !== undefined && value !== null\n}\n\nexport function assertDefined<T>(\n  value: T,\n  message: string\n): asserts value is NonNullable<T> {\n  invariant(isDefined(value), message)\n}\n```\n","publish_time":1635541866003,"_cnpm_publish_time":1635541866003,"dist-tags":{"latest":"3.0.5"}}