{"_id":"@cursormove/flow-is-helpers","_rev":"1-13d786714e3ac7a6dcab56ee269d9a0c","name":"@cursormove/flow-is-helpers","dist-tags":{"latest":"2.1.0"},"versions":{"2.1.0":{"name":"@cursormove/flow-is-helpers","version":"2.1.0","description":"Lodash (is) and additional Flow type %checks helpers.","license":"MIT","author":{"name":"te schultz"},"main":"dist/flow-is-helpers.web.js","module":"dist/flow-is-helpers.js","sideEffects":false,"keywords":["flow","flow-helpers","flow-is-helpers","flow-checks","flow-lodash","flow-typed","@cursormove"],"repository":{"type":"git","url":"git+https://github.com/cursormove/flow-is-helpers.git"},"bugs":{"url":"https://github.com/cursormove/flow-is-helpers/issues"},"scripts":{"build:browser":"env-cmd production,browser redrun webpack:build -S","build:node":"env-cmd production,node redrun webpack:build -S","build":"redrun clean build:node build:browser test:node:mocha -S","clean":"node ./__config__/scripts/clean.js","commit":"git cz","dev":"env-cmd development redrun clean webpack:dev -S","flow:check":"flow check","flow:install":"flow-typed install","flow:typed-createstub":"flow-typed create-stub -o --libdefDir ./flow-typed/customdefs","flow:update":"flow-typed update-cache --debug","setup:install":"yarn install","npm:packlist":"npm pack --dry-run","npm:audit":"npm audit","npm:audit-fix":"npm audit fix","postinstall":"redrun flow:install -S","prepublishOnly":"yarn run build && yarn run test","reinstall":"env-cmd reinstall redrun clean setup:install -S","release-it":"release-it","release-it:dry":"release-it --dry-run","test":"env-cmd test redrun clean test:node -s","test:node":"env-cmd test,test:node redrun clean build test:node:mocha -s","test:node:mocha":"env-cmd test,test:node node __tests__/tests.index.js","update:interactive":"yarn upgrade-interactive --latest","webpack:build":"webpack --config ./__config__/webpack/webpack.config.index.js --color --progress","webpack:dev":"env-cmd development webpack --config ./__config__/webpack/webpack.config.index.js -w"},"dependencies":{"@babel/runtime":"7.4.2","core-js":"3.0.0","lodash":"4.17.11"},"devDependencies":{"@babel/cli":"7.2.3","@babel/core":"7.4.0","@babel/plugin-proposal-class-properties":"7.4.0","@babel/plugin-proposal-decorators":"7.4.0","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-proposal-json-strings":"7.2.0","@babel/plugin-proposal-object-rest-spread":"7.4.0","@babel/plugin-proposal-optional-catch-binding":"7.2.0","@babel/plugin-proposal-optional-chaining":"7.2.0","@babel/plugin-proposal-pipeline-operator":"7.3.2","@babel/plugin-syntax-async-generators":"7.2.0","@babel/plugin-syntax-do-expressions":"7.2.0","@babel/plugin-syntax-dynamic-import":"7.2.0","@babel/plugin-syntax-flow":"7.2.0","@babel/plugin-syntax-import-meta":"7.2.0","@babel/plugin-syntax-object-rest-spread":"7.2.0","@babel/plugin-syntax-optional-catch-binding":"7.2.0","@babel/plugin-transform-async-to-generator":"7.4.0","@babel/plugin-transform-classes":"7.4.0","@babel/plugin-transform-destructuring":"7.4.0","@babel/plugin-transform-flow-comments":"7.4.0","@babel/plugin-transform-flow-strip-types":"^7.4.0","@babel/plugin-transform-function-name":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.4.0","@babel/plugin-transform-parameters":"7.4.0","@babel/plugin-transform-property-mutators":"7.2.0","@babel/plugin-transform-regenerator":"7.4.0","@babel/plugin-transform-runtime":"7.4.0","@babel/plugin-transform-shorthand-properties":"7.2.0","@babel/plugin-transform-template-literals":"7.2.0","@babel/preset-env":"7.4.2","@babel/register":"7.4.0","@babel/runtime-corejs3":"7.4.2","app-root-dir":"1.0.2","auto-changelog":"^1.12.0","babel-eslint":"10.0.1","babel-loader":"8.0.5","babel-plugin-dynamic-import-node":"2.2.0","babel-plugin-lodash":"3.3.4","babel-plugin-module-resolver":"3.2.0","babel-plugin-transform-inline-environment-variables":"0.4.3","babel-preset-minify":"0.5.0","chai":"4.2.0","colur":"1.0.0","commitizen":"3.0.7","cz-customizable-te":"6.2.0","del":"4.0.0","env-cmd":"8.0.2","eslint":"5.15.3","eslint-plugin-babel":"5.3.0","eslint-plugin-flowtype":"3.4.2","eslint-plugin-node":"8.0.1","flow-bin":"0.95.1","flow-typed":"2.5.1","flow-webpack-plugin":"1.2.0","glob-all":"3.1.0","hard-source-webpack-plugin":"^0.13.1","license-webpack-plugin":"^2.1.1","lodash-webpack-plugin":"^0.11.5","mocha":"6.0.2","progress-bar-webpack-plugin":"1.12.1","redrun":"7.1.5","release-it":"^10.3.1","uglifyjs-webpack-plugin":"^2.1.2","upath":"1.1.2","webpack":"4.29.6","webpack-cli":"3.3.0","webpack-node-externals":"1.7.2"},"config":{"commitizen":{"path":"node_modules/cz-customizable-te"},"cz-customizable":{"config":"./.cz-config.js"}},"gitHead":"f8670807f870953ae6610a6e5c32fea3d5d0b473","homepage":"https://github.com/cursormove/flow-is-helpers#readme","_id":"@cursormove/flow-is-helpers@2.1.0","_npmVersion":"6.4.1","_nodeVersion":"11.3.0","_npmUser":{"name":"artisin","email":"te.artisin@gmail.com"},"dist":{"integrity":"sha512-B6MP74jm/cFvePQKtFbUtoKdQGZL1Hl9bPuvL5+RRBG4F8f33tDF8crdR1muISwiOV1QAVqer37/IfDkfvh4DA==","shasum":"ba033307bb9d66cfdf63c7bf9c0041351d7b12e6","tarball":"https://registry.npmjs.org/@cursormove/flow-is-helpers/-/flow-is-helpers-2.1.0.tgz","fileCount":31,"unpackedSize":410430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm7NpCRA9TVsSAnZWagAA8/AP/3050lhi2rKoyaPRMqQN\nFuXAHJ19XwpF6K3AzobdmLjH0ZrhbosoRV20mP4lifWDbwPU90lSqFrH4oGw\n05u7dJsyDrOiQJvXNIElnxQ1sMga5Nf5Zf2yLL75ZlhZpCi4hg0gVfyIGK9K\nglD2cBQNDBd/Okw/zaK4QgZDOOlPnfNryK7w2ROXw3Y5coOgY6tbTKfJyGxS\nrBk7iWLsrdcmlibVy0yhIWI7J5nA/3INlYiTwLJG5Ahxd3d/PceOcRL+xoFL\nofLHZB5FD7kvdLwDWEvQuEvifrlvjfXA5KIzBGpAYfq78rKkFdwAH7YbuyCP\niTyzEPl83EqgJYqLuJVqQvl+L87m/xkWIldWtiKZPf9tmsCzOloS3kVejcDp\n9rRNwyj3uDvaNZoS3hAWDAwJ0vBnRKk4Zt6XbtUCldlOmsxB4cf+bxHJ+8tr\nUZVFFOmh6o7yaJzQB/1c94cgB08k1j3W+FAbQezE3+aFuzKrIo++5KG7kNZR\nlYYHTEZibFKXDEQ0vnwXv2oEqBW7q1cPiQ/nhGn436Tkki7oUKmYdZannzUM\nwtKqpNZ++n8F1WCa/H09NgWRtTgfaygrHk+fWobufTu4PKeENg06K602PBik\nCxS05IudTcgCPZn9PIMjZ5TAFCcQPL/ObnAV2U5LA9/9jZ9L1nqPhlAKfWlP\nxwvX\r\n=MTXb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOShNcq3RmXQV42DC/pOvFTSfwaOXZwHyq7VtQ8nPYzAiBE2f5sLtH4suzmZW6lz9926jXBZLEmhSEv8dGZ5L06yg=="}]},"maintainers":[{"name":"artisin","email":"te.artisin@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flow-is-helpers_2.1.0_1553707880784_0.43087285916100315"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-27T17:31:20.596Z","2.1.0":"2019-03-27T17:31:20.934Z","modified":"2022-04-05T02:20:37.746Z"},"maintainers":[{"name":"artisin","email":"te.artisin@gmail.com"}],"description":"Lodash (is) and additional Flow type %checks helpers.","homepage":"https://github.com/cursormove/flow-is-helpers#readme","keywords":["flow","flow-helpers","flow-is-helpers","flow-checks","flow-lodash","flow-typed","@cursormove"],"repository":{"type":"git","url":"git+https://github.com/cursormove/flow-is-helpers.git"},"author":{"name":"te schultz"},"bugs":{"url":"https://github.com/cursormove/flow-is-helpers/issues"},"license":"MIT","readme":"# Predicate `truthy` Function via `%check`\n[![wercker status](https://app.wercker.com/status/bafa2a9b73363a572c84f8056c84c915/s/master \"wercker status\")](https://app.wercker.com/project/byKey/bafa2a9b73363a572c84f8056c84c915)\n\n## Description\n\nThis is a [Flow](https://flow.org) helper library for Lodash [`is`](https://lodash.com/docs/4.17.11#isArguments) and additional Flow predicate type [`%checks`](https://flow.org/en/docs/types/functions/#toc-predicate-functions) functions. Simply put, this library contains converted `truthy` predicate functions through the use of Flow `%check` annotations. By doing so it aids and increases the ability for [The Flow Parser](https://github.com/facebook/flow/tree/master/src/parser) to properly check the defined predicate functions.\n\n## Why?\n\nFlow and Lodash's predicate functions (`is***`) don't work well together (if at all in some cases) resulting in duplicate logic. Ideally a fix will be implemented into the main `flow-type` [Lodash library](https://github.com/flow-typed/flow-typed/tree/master/definitions/npm/lodash_v4.x.x) but until that time comes (if ever) this library acts as a stopgap solution. In addition, this library includes some helpful custom predicate check functions.\n\n## Install\n\n```bash\n# npm\nnpm i --save @cursormove/flow-is-helpers\n\n# yarn\nyarn add @cursormove/flow-is-helpers\n```\n\n## Usage\n\nThis Library is a drop-in replacement for Lodash's predicate functions. You should be able to just swap out Lodash predicate functions like `isString` with this library. I recommend you take a quick look at the code base just so you have a better understanding of what is going on but the gist of it is pretty simple.\n\n```js\nimport {\n  isString,\n} from '@cursormove/flow-is-helpers';\n\n// Flow Type Check & truthy predicate function check\nconst hello = (val: string) => isString(val) ? `Hello ${val}` : 'Hello Nobody';\n\nhello('World'); // 'Hello World' \nhello(null); // 'Hello Nobody'\n```\n\n## API 🠲 Custom Checks\n\n__Array Checks__\n+ `isEmptyArray` 🠲 Checks if Array is empty.\n+ `isNonEmptyArray` 🠲 Checks if Array is empty.\n\n\n__Function Checks__\n+ `isPromise` 🠲 Checks if Function type is a Promise.\n+ `isAsync` 🠲 Checks if Function type is Async.\n+ `isGenerator` 🠲 Checks if Function type is a Generator Iterator.\n+ `isGeneratorFunction` 🠲 Checks if Function type is a Generator.\n\n\n__Plain Object Checks (Not ObjectLike)__\n+ `isEmptyObject` 🠲 Checks if Object is empty.\n+ `isNonEmptyObject` 🠲 Checks if Object is not empty.\n+ `isFrozen` 🠲 Checks if Object is [Frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isFrozen).\n+ `isFrozen` 🠲 Checks if Object is [Sealed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed).\n+ `isFrozen` 🠲 Checks if Object is [Extensible](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isExtensible).\n\n\n__String Checks__\n+ `isEmptyString` 🠲 Checks if String is empty.\n+ `isNonEmptyString` 🠲 Checks if String is not empty.\n\n\n__Number Checks__\n+ `isNan` 🠲 Checks if value is not a Number.\n+ `isInfinity` 🠲 Checks if value is either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`.\n\n\n__Nil Checks__\n+ `isNotNil` 🠲 Opposite of Lodash's `isNil` in that it's not `null` or `undefined`.\n\n\n__Miscellaneous Checks__\n+ `isIterable` 🠲 Checks if value is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterators)\n+ `isAction` 🠲 Checks if value is a Redux [`Action`](https://redux.js.org/basics/actions)\n\n\n\n## API 🠲 Lodash Checks\n\n__Includes all Lodash `is` Predicate Functions__\n\n+ [`isArguments`](https://lodash.com/docs/4.17.10#isArguments)\n+ [`isArray`](https://lodash.com/docs/4.17.10#isArray)\n+ [`isArrayBuffer`](https://lodash.com/docs/4.17.10#isArrayBuffer)\n+ [`isArrayLike`](https://lodash.com/docs/4.17.10#isArrayLike)\n+ [`isArrayLikeObject`](https://lodash.com/docs/4.17.10#isArrayLikeObject)\n+ [`isBoolean`](https://lodash.com/docs/4.17.10#isBoolean)\n+ [`isBuffer`](https://lodash.com/docs/4.17.10#isBuffer)\n+ [`isDate`](https://lodash.com/docs/4.17.10#isDate)\n+ [`isElement`](https://lodash.com/docs/4.17.10#isElement)\n+ [`isEmpty`](https://lodash.com/docs/4.17.10#isEmpty)\n+ [`isEqual`](https://lodash.com/docs/4.17.10#isEqual)\n+ [`isEqualWith`](https://lodash.com/docs/4.17.10#isEqualWith)\n+ [`isError`](https://lodash.com/docs/4.17.10#isError)\n+ [`isFinite`](https://lodash.com/docs/4.17.10#isFinite)\n+ [`isFunction`](https://lodash.com/docs/4.17.10#isFunction)\n+ [`isInteger`](https://lodash.com/docs/4.17.10#isInteger)\n+ [`isLength`](https://lodash.com/docs/4.17.10#isLength)\n+ [`isMap`](https://lodash.com/docs/4.17.10#isMap)\n+ [`isMatch`](https://lodash.com/docs/4.17.10#isMatch)\n+ [`isMatchWith`](https://lodash.com/docs/4.17.10#isMatchWith)\n+ [`isNaN`](https://lodash.com/docs/4.17.10#isNaN)\n+ [`isNative`](https://lodash.com/docs/4.17.10#isNative)\n+ [`isNil`](https://lodash.com/docs/4.17.10#isNil)\n+ [`isNull`](https://lodash.com/docs/4.17.10#isNull)\n+ [`isNumber`](https://lodash.com/docs/4.17.10#isNumber)\n+ [`isObject`](https://lodash.com/docs/4.17.10#isObject)\n+ [`isObjectLike`](https://lodash.com/docs/4.17.10#isObjectLike)\n+ [`isPlainObject`](https://lodash.com/docs/4.17.10#isPlainObject)\n+ [`isRegExp`](https://lodash.com/docs/4.17.10#isRegExp)\n+ [`isSafeInteger`](https://lodash.com/docs/4.17.10#isSafeInteger)\n+ [`isSet`](https://lodash.com/docs/4.17.10#isSet)\n+ [`isString`](https://lodash.com/docs/4.17.10#isString)\n+ [`isSymbol`](https://lodash.com/docs/4.17.10#isSymbol)\n+ [`isTypedArray`](https://lodash.com/docs/4.17.10#isTypedArray)\n+ [`isUndefined`](https://lodash.com/docs/4.17.10#isUndefined)\n+ [`isWeakMap`](https://lodash.com/docs/4.17.10#isWeakMap)\n+ [`isWeakSet`](https://lodash.com/docs/4.17.10#isWeakSet)\n\n\n---\n\nBest, [te](http://www.teschultz.com/)\n","readmeFilename":"README.md"}