{"versions":{"0.1.3":{"name":"fp-and-or","description":"","version":"0.1.3","author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":">=10"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"devDependencies":{"eslint":"^7.14.0","eslint-config-raine":"^0.1.2","eslint-plugin-fp":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.1.0","jest":"^26.6.3"},"gitHead":"92a0f35d1a83aca20f0283bf88a981cae0af8ed3","_id":"fp-and-or@0.1.3","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"e6fba83872a5853a56b3ebdf8d3167f5dfca1882","size":3088,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-0.1.3.tgz"},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_0.1.3_1605920961376_0.20320863039676196"},"_hasShrinkwrap":false,"publish_time":1605920962022,"_cnpm_publish_time":1605920962022,"contributors":[]},"0.1.2":{"name":"fp-and-or","description":"","version":"0.1.2","author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":">=12"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"devDependencies":{"eslint":"^7.13.0","eslint-config-raine":"^0.1.1","eslint-plugin-fp":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.1.0","jest":"^26.6.3"},"gitHead":"0ea3bea695752f3484e899a6b3be554f76ce3b04","_id":"fp-and-or@0.1.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"42f817b48a2566462f546cd61c165f17a9090b54","size":3078,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-0.1.2.tgz"},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_0.1.2_1605139536979_0.1364048159870055"},"_hasShrinkwrap":false,"publish_time":1605139537132,"_cnpm_publish_time":1605139537132,"contributors":[]},"0.1.1":{"name":"fp-and-or","description":"","version":"0.1.1","author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":">=12"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"devDependencies":{"eslint":"^7.13.0","eslint-config-raine":"^0.1.1","eslint-plugin-fp":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.7.7","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.1.0","jest":"^26.6.3"},"gitHead":"b3511540453e06a91f55682facb44a8cbd32aff2","_id":"fp-and-or@0.1.1","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"b5425ecd5a8c1e4e29b63c95ef7bc1c23eb9faf8","size":3107,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-0.1.1.tgz"},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raineorshine@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_0.1.1_1605138771669_0.724467289017773"},"_hasShrinkwrap":false,"publish_time":1605138771817,"_cnpm_publish_time":1605138771817,"contributors":[]},"0.1.4":{"name":"fp-and-or","description":"Simple `and` and `or` functional programming predicates","version":"0.1.4","author":{"name":"Raine Revere","email":"raineorshine@gmail.com","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":">=10"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/raineorshine/fp-and-or.git"},"devDependencies":{"eslint":"^7.14.0","eslint-config-raine":"^0.1.2","eslint-plugin-fp":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-jsdoc":"^30.7.8","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^4.2.1","eslint-plugin-standard":"^4.1.0","jest":"^26.6.3"},"types":"./index.d.ts","gitHead":"7725c1591908353b0c5cba3a0b5e0d64335acb57","bugs":{"url":"https://github.com/raineorshine/fp-and-or/issues"},"homepage":"https://github.com/raineorshine/fp-and-or#readme","_id":"fp-and-or@0.1.4","_nodeVersion":"16.15.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-+yRYRhpnFPWXSly/6V4Lw9IfOV26uu30kynGJ03PW+MnjOEQe45RZ141QcS0aJehYBYA50GfCDnsRbFJdhssRw==","shasum":"0268c800c359ede259cdcbc352654e698b7ea299","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-0.1.4.tgz","fileCount":11,"unpackedSize":13510,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEqEDXwB+Oyef9nUNN6EkzhkicotJxI2cbVHrpVjTe0QAiAuBEtuPf7nMLYpy6LLQbqPztrhvgbOTp2pDgVgLGbiyA=="}]},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raine@cybersemics.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_0.1.4_1695824944391_0.5379712153639566"},"_hasShrinkwrap":false,"contributors":[]},"1.0.0":{"name":"fp-and-or","description":"Simple `and` and `or` functional programming predicates","version":"1.0.0","author":{"name":"Raine Revere","email":"raine.revere@pm.me","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":"^16.10.0 || >=18.0.0"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/raineorshine/fp-and-or.git"},"devDependencies":{"eslint":"^8.50.0","eslint-config-raine":"^0.5.0","eslint-plugin-import":"^2.28.1","eslint-plugin-jsdoc":"^46.8.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","eslint-plugin-standard":"^4.1.0","jest":"^29.7.0","lodash":"^4.17.21"},"types":"./index.d.ts","gitHead":"5650d53c01002478909fb7d46ce27f8532088120","bugs":{"url":"https://github.com/raineorshine/fp-and-or/issues"},"homepage":"https://github.com/raineorshine/fp-and-or#readme","_id":"fp-and-or@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-SnyUTlHhaeLmSqSuKleQG5SHBJwHN5jBNJa+Q8AzSHc23lp5UtJMLcilsWhg7aHhlj8Kcx404alBv8vHw95+qQ==","shasum":"dd71ca3dc12df70cbbc7ba743873ea4cff97f502","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-1.0.0.tgz","fileCount":12,"unpackedSize":14279,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWao4B6R3lEY8TMd4E4vrdEPFYmEtSIDtdEQkkP8PEbQIgOlQ4Te47XD+RHkqLxcjCpebcGxTvuNd4Y0w4QTGSeIw="}]},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raine@cybersemics.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_1.0.0_1695918887836_0.9625568873115131"},"_hasShrinkwrap":false,"contributors":[]},"1.0.1":{"name":"fp-and-or","description":"Simple `and` and `or` functional programming predicates","version":"1.0.1","author":{"name":"Raine Revere","email":"raine.revere@pm.me","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":"^16.10.0 || >=18.0.0"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/raineorshine/fp-and-or.git"},"devDependencies":{"eslint":"^8.50.0","eslint-config-raine":"^0.5.0","eslint-plugin-import":"^2.28.1","eslint-plugin-jsdoc":"^46.8.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","eslint-plugin-standard":"^4.1.0","jest":"^29.7.0","lodash":"^4.17.21"},"_id":"fp-and-or@1.0.1","gitHead":"7e9ca29e52e0817f3edbbe974eaa08c6b93d4146","types":"./index.d.ts","bugs":{"url":"https://github.com/raineorshine/fp-and-or/issues"},"homepage":"https://github.com/raineorshine/fp-and-or#readme","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-sVRCNdconA9tAu154jFh5jRZPVTz2MnHPmt1zdxiR02UhNy5YMHmFMFQofoKgXmVkpVSbWgzpoCe8xC7GtqPpg==","shasum":"329300b3be63b7ee410b583bbce294afeaf8b9a5","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-1.0.1.tgz","fileCount":12,"unpackedSize":14275,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6Vy9cPkPD9xyXdRKWTY1+nCaHLaz0b/thdKomhRskXgIgA4CXp+Na5K2uvIBvWmwKUgyPebAWuSYiAVAkAu4ov/w="}]},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raine@cybersemics.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_1.0.1_1699153457936_0.0844242834700133"},"_hasShrinkwrap":false,"contributors":[]},"1.0.2":{"name":"fp-and-or","description":"Simple `and` and `or` functional programming predicates","version":"1.0.2","author":{"name":"Raine Revere","email":"raine.revere@pm.me","url":"https://github.com/raineorshine"},"license":"ISC","engines":{"node":"^16.10.0 || >=18.0.0"},"scripts":{"build":"node build.js","lint":"eslint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/raineorshine/fp-and-or.git"},"devDependencies":{"eslint":"^8.50.0","eslint-config-raine":"^0.5.0","eslint-plugin-import":"^2.28.1","eslint-plugin-jsdoc":"^46.8.2","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","eslint-plugin-standard":"^4.1.0","jest":"^29.7.0","lodash":"^4.17.21"},"_id":"fp-and-or@1.0.2","gitHead":"6922d82a7b26aa7a3a8b0788c2c6a4ae5cfe6ab5","types":"./index.d.ts","bugs":{"url":"https://github.com/raineorshine/fp-and-or/issues"},"homepage":"https://github.com/raineorshine/fp-and-or#readme","_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-jRuhDpN/8LaE2ghHYKuj11SqUcfus38Rhsd+m9EReVes4KQdLErmHoP5FAWUBg+kci56ucryVryKda7cCyHT6A==","shasum":"e3901922c7cead5f7cf8eb449a4a91c98b718fab","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/fp-and-or/-/fp-and-or-1.0.2.tgz","fileCount":12,"unpackedSize":14330,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGD7L1GjkPah7r44gFsRvKYnTRwPEJKGrs8wjWy1slaqAiEApw0595PwgWIagprU7nE7SkpEjEeFAOWG23/HldloJg8="}]},"_npmUser":{"name":"anonymous","email":"raine@cybersemics.org"},"directories":{},"maintainers":[{"name":"anonymous","email":"raine@cybersemics.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fp-and-or_1.0.2_1699154549313_0.771489390026614"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"1.0.2"},"name":"fp-and-or","time":{"modified":"2023-11-05T03:23:16.626Z","created":"2022-01-26T21:13:35.224Z","0.1.3":"2020-11-21T01:09:22.022Z","0.1.2":"2020-11-12T00:05:37.132Z","0.1.1":"2020-11-11T23:52:51.817Z","0.1.4":"2023-09-27T14:29:04.573Z","1.0.0":"2023-09-28T16:34:48.080Z","1.0.1":"2023-11-05T03:04:18.184Z","1.0.2":"2023-11-05T03:22:29.502Z"},"readme":"# fp-and-or\n[![npm version](https://img.shields.io/npm/v/fp-and-or.svg)](https://npmjs.org/package/fp-and-or)\n\nSimple `and` and `or` functional programming predicates.\n\n- `and(...fs): (...args): boolean` - Returns a predicate that returns true if **all** arguments are true or evaluate to true for the given input.\n- `or(...fs): (...args): boolean` - Returns a predicate that returns true if **at least one** argument is true or evaluates to true for the given input.\n\nA predicate is a function that returns a `boolean`, commonly used in `Array.prototype.filter`.\n\ne.g.\n\n```js\nconst isEven = n => n%2 === 0\nconst isPositive = n => n > 0\n\n// un-fancy\nitems.filter(x => isEven(x) || isPositive(x))\n\n// fancy\nitems.filter(or(isEven, isPositive))\n```\n\n## Install\n\n```sh\nnpm install --save fp-and-or\n```\n\n## Usage\n\n```js\nconst { and, or } = require('fp-and-or')\n\nconst isEven = n => n % 2 === 0\nconst isPositive = n => n > 0\nconst isBig = n => Math.abs(n) >= 1000\n```\n\n### and\n\n#### return true with no predicates\n```js\nand()(1) // true\n```\n\n#### return result of single predicate\n```js\nand(isEven)(1) // false\nand(isEven)(2) // true\n```\n\n#### return logical AND of two predicates\n```js\nand(isEven, isPositive)(-2) // false\nand(isEven, isPositive)(-1) // false\nand(isEven, isPositive)(1) // false\nand(isEven, isPositive)(2) // true\n```\n\n#### return logical AND of three predicates\n```js\nand(isEven, isPositive, isBig)(-2) // false\nand(isEven, isPositive, isBig)(-1) // false\nand(isEven, isPositive, isBig)(1) // false\nand(isEven, isPositive, isBig)(2) // false\nand(isEven, isPositive, isBig)(-1002) // false\nand(isEven, isPositive, isBig)(-1001) // false\nand(isEven, isPositive, isBig)(1001) // false\nand(isEven, isPositive, isBig)(1002) // true\n```\n\n#### return value of single boolean\n```js\nand(true)(1) // true\nand(false)(1) // false\n```\n\n#### return value of two booleans\n```js\nand(false, false)(1) // false\nand(false, true)(1) // false\nand(true, false)(1) // false\nand(true, true)(1) // true\n```\n\n#### return value of multiple booleans\n```js\nand(false, false, false)(1) // false\nand(false, true, false)(1) // false\nand(true, false, false)(1) // false\nand(true, true, false)(1) // false\nand(false, false, true)(1) // false\nand(false, true, true)(1) // false\nand(true, false, true)(1) // false\nand(true, true, true)(1) // true\n```\n\n#### return value of mixed booleans and functions\n```js\nand(false, isEven)(1) // false\nand(false, isEven)(2) // false\nand(true, isEven)(1) // false\nand(true, isEven)(2) // true\nand(isEven, false)(1) // false\nand(isEven, false)(2) // false\nand(isEven, true)(1) // false\nand(isEven, true)(2) // true\n```\n\n### or\n\n#### return false with no predicates\n```js\nor()(1) // false\n```\n\n#### return result of single predicate\n```js\nor(isEven)(1) // false\nor(isEven)(2) // true\n```\n\n#### return logical OR of two predicates\n```js\nor(isEven, isPositive)(-2) // true\nor(isEven, isPositive)(-1) // false\nor(isEven, isPositive)(1) // true\nor(isEven, isPositive)(2) // true\n```\n\n#### return logical OR of three predicates\n```js\nor(isEven, isPositive, isBig)(-2) // true\nor(isEven, isPositive, isBig)(-1) // false\nor(isEven, isPositive, isBig)(0) // true\nor(isEven, isPositive, isBig)(1) // true\nor(isEven, isPositive, isBig)(2) // true\nor(isEven, isPositive, isBig)(-1002) // true\nor(isEven, isPositive, isBig)(-1001) // true\nor(isEven, isPositive, isBig)(1001) // true\nor(isEven, isPositive, isBig)(1002) // true\n```\n\n#### return value of single boolean\n```js\nor(true)(1) // true\nor(false)(1) // false\n```\n\n#### return value of two booleans\n```js\nor(false, false)(1) // false\nor(false, true)(1) // true\nor(true, false)(1) // true\nor(true, true)(1) // true\n```\n\n#### return value of multiple booleans\n```js\nor(false, false, false)(1) // false\nor(false, true, false)(1) // true\nor(true, false, false)(1) // true\nor(true, true, false)(1) // true\nor(false, false, true)(1) // true\nor(false, true, true)(1) // true\nor(true, false, true)(1) // true\nor(true, true, true)(1) // true\n```\n\n#### return value of mixed booleans and functions\n```js\nor(false, isEven)(1) // false\nor(false, isEven)(2) // true\nor(true, isEven)(1) // true\nor(true, isEven)(2) // true\nor(isEven, false)(1) // false\nor(isEven, false)(2) // true\nor(isEven, true)(1) // true\nor(isEven, true)(2) // true\n```","users":{}}