{"_id":"predicates","_rev":"26-ff3ba94f277b1c961fb10bf9f42c9f57","name":"predicates","description":"Set of various predicates for type checking, assertions, filtering etc","dist-tags":{"latest":"2.0.3"},"versions":{"0.1.0":{"name":"predicates","version":"0.1.0","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","keywords":["predicates","type","check","assert","filter"],"dependencies":{},"devDependencies":{"blanket":"^1.1.6","mocha":"^2.0.1"},"scripts":{"test":"mocha -r ./test/bootstrap --reporter spec ./test/*Test.js","coverage":"mocha -r ./test/bootstrap -R html-cov ./test/*Test.js > coverage.html"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"c6b90e28bd28825f5b2cc48d82d94fe08a3a9509","_id":"predicates@0.1.0","_shasum":"65ff55331ec4b204cded76cb2a162d62288f5d2f","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"65ff55331ec4b204cded76cb2a162d62288f5d2f","tarball":"https://registry.npmjs.org/predicates/-/predicates-0.1.0.tgz","integrity":"sha512-hQYFkG4KA2ZwfuJxpkQiksoUnz5TZ7/AAoFCJJG4SPvCO1MJpD5O7JD+SvaoZhgE4Px+Rf/pCQBc2zNasXPl+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEgpudt2qlw9X+cstslOWJlIeYv8Zn9UV59tXamw0jkwIhAJfr75AOQqezAMiE3Da47G7S25/MC30m7duZpTTmmNb1"}]},"directories":{}},"0.2.0":{"name":"predicates","version":"0.2.0","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"blanket":"^1.1.6","dmd-examples-highlight":"^0.1.1","jsdoc-to-markdown":"^0.5.9","mocha":"^2.0.1"},"scripts":{"test":"mocha -r ./test/bootstrap --reporter spec ./test/*Test.js","coverage":"mocha -r ./test/bootstrap -R html-cov ./test/*Test.js > coverage.html","docs":"jsdoc2md -v src/*.js --plugin dmd-examples-highlight --partial jsdoc2md/name-prefix.hbs jsdoc2md/fields.hbs jsdoc2md/throws.hbs > docs/api.md"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"4db2af067a61d86e7d902c127c732ff564f88982","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@0.2.0","_shasum":"77102542b2bb18f46a766d12f8f443fff4f061c1","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"77102542b2bb18f46a766d12f8f443fff4f061c1","tarball":"https://registry.npmjs.org/predicates/-/predicates-0.2.0.tgz","integrity":"sha512-mu4530JSIdLqX+zJ995A/EgyetP5JcxvozlarG44xNfxcjNcxq2wk/e/JpccKAlTDQADzYe26eyDU0TWkcl0Og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnDHTqlUMspvf3Eip5WOJTjEj9/rK85OZDJLYAhJoJHAiAEin8Y1j0IRbT9kvX/wYdZVAF3twgwT7oB24YHu9ZAXw=="}]},"directories":{}},"0.2.1":{"name":"predicates","version":"0.2.1","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"blanket":"^1.1.6","dmd-examples-highlight":"^0.1.1","jsdoc-to-markdown":"^0.5.9","mocha":"^2.0.1"},"scripts":{"test":"mocha -r ./test/bootstrap --reporter spec ./test/*Test.js","coverage":"mocha -r ./test/bootstrap -R html-cov ./test/*Test.js > coverage.html","docs":"jsdoc2md -v src/*.js --plugin dmd-examples-highlight --partial jsdoc2md/name-prefix.hbs jsdoc2md/fields.hbs jsdoc2md/throws.hbs > docs/api.md"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"a2cb147ca354fcc2c39c526cb7aede391be3ef29","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@0.2.1","_shasum":"6469e759c4ee63ab254d7041a480940819104e6c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"6469e759c4ee63ab254d7041a480940819104e6c","tarball":"https://registry.npmjs.org/predicates/-/predicates-0.2.1.tgz","integrity":"sha512-r+isYQpbzjFxLWDD8tkuB6xt+6br10v+g1Rva9UArh5ZzzCC7UQQypVQ18FP44EZyc0erHKhkbjFNkH04aAeHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAeFzvisRdO8TmFq7Lj+g411+V7Hirgd1Rkhq87yR/oLAiEAn8Zz9v8qefHmK2e0zDird0ApWoKuQ62H2WvooSAVQF8="}]},"directories":{}},"0.3.0":{"name":"predicates","version":"0.3.0","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"blanket":"^1.1.6","dmd-examples-highlight":"^0.1.1","jsdoc-to-markdown":"^0.5.9","mocha":"^2.0.1"},"scripts":{"test":"mocha -r ./test/bootstrap --reporter spec ./test/*Test.js","coverage":"mocha -r ./test/bootstrap -R html-cov ./test/*Test.js > coverage.html","docs":"jsdoc2md -v src/*.js --plugin dmd-examples-highlight --partial jsdoc2md/name-prefix.hbs jsdoc2md/fields.hbs jsdoc2md/throws.hbs > docs/api.md"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"ecaa398d0157efae75313b2a76e22b4365bda227","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@0.3.0","_shasum":"18e9af4a389f8a37f5cec3fee07fae0a04832213","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"18e9af4a389f8a37f5cec3fee07fae0a04832213","tarball":"https://registry.npmjs.org/predicates/-/predicates-0.3.0.tgz","integrity":"sha512-zGzrO9lXtgep9fSFcLWOdKGjctonJC8MLBRscplkKPkPmpXSJnbIFf9pbiz3ZKBArVrobTGGoXeMRfxCHErjFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLDGrBmXywK2sSOIG+/bNQB2MLE7kIlRtKS5hdnYQk7QIgQWkIO4swcVwMe/r0v+7Z0t93TuwVg5vQ6OPnRNcd8vI="}]},"directories":{}},"1.0.0-rc.1":{"name":"predicates","version":"1.0.0-rc.1","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"blanket":"^1.1.x","dmd-examples-highlight":"^0.1.x","eslint":"^0.9.x","jsdoc-to-markdown":"^0.5.x","mocha":"^2.0.x"},"scripts":{"test":"mocha -r ./test/bootstrap --reporter spec ./test/*Test.js","coverage":"mocha -r ./test/bootstrap -R html-cov ./test/*Test.js > coverage.html","docs":"jsdoc2md -v src/*.js --plugin dmd-examples-highlight --partial jsdoc2md/name-prefix.hbs jsdoc2md/fields.hbs jsdoc2md/throws.hbs > docs/api.md","lint":"eslint -c .config/eslint.yaml src"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"38d006b8fbf5f52f378de950942ae76ef77c1b4c","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@1.0.0-rc.1","_shasum":"3cd6a7006b046c304b0fc9307464326677e7d467","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"3cd6a7006b046c304b0fc9307464326677e7d467","tarball":"https://registry.npmjs.org/predicates/-/predicates-1.0.0-rc.1.tgz","integrity":"sha512-JZRaqDC9P56CC1UKYkPeiUKNw0ywsomEFVwnn/Po6c4DGUeIzYT/r/DKgGdLxodT6Goj6iHKDd/7HgX9oPVmwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBA3P9qujXkfjXMtT+7mY7TaRpJ8JrKAtPRLKqU11NeAIgUX+SNilLxiOaVv0A2AO1A8dkOwETcLUnpruq5D3OeII="}]},"directories":{}},"1.0.0-rc.2":{"name":"predicates","version":"1.0.0-rc.2","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"browserify":"^8.x.x","chai":"^1.10.0","dmd-examples-highlight":"^0.1.x","eslint":"^0.10.x","glob":"^4.3.x","gulp":"^3.8.x","gulp-coverage":"^0.3.32","gulp-eslint":"^0.2.0","gulp-mocha":"^2.0.0","gulp-rename":"^1.2.0","gulp-size":"^1.1.0","gulp-uglify":"^1.0.2","jsdoc-to-markdown":"^0.5.x","mocha":"^2.0.x","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"testling":{"harness":"mocha","files":"test/*Test.js","browsers":["ie/8..latest","chrome/25..latest","firefox/20..latest","safari/5..latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"a93bcea3508d4e62b3742d92ace45059fa009c72","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@1.0.0-rc.2","scripts":{},"_shasum":"2344589babb263818357e46770f573383ef623e7","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"2344589babb263818357e46770f573383ef623e7","tarball":"https://registry.npmjs.org/predicates/-/predicates-1.0.0-rc.2.tgz","integrity":"sha512-i91c92T1xHCrfPw+deqxzTpsynuILEE4LYiKHkHA8Mw8jgIOVVDheOrPH5RYIT0NPXMbaXIERZFbCN5waYEk4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDN2Mgm4OI68lrkJnx6B7n+xe02xp2+NjyxDJsFNq7qhwIhAJMP5viwDOSiVNgBx/YlgBZUp37/OtFDlybrF3CMF6Dk"}]},"directories":{}},"1.0.0":{"name":"predicates","version":"1.0.0","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"browserify":"^8.x.x","chai":"^1.10.0","dmd-examples-highlight":"^0.1.x","eslint":"^0.10.x","glob":"^4.3.x","gulp":"^3.8.x","gulp-coverage":"^0.3.32","gulp-eslint":"^0.2.0","gulp-mocha":"^2.0.0","gulp-rename":"^1.2.0","gulp-size":"^1.1.0","gulp-uglify":"^1.0.2","jsdoc-to-markdown":"^0.5.x","mocha":"^2.0.x","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"testling":{"harness":"mocha","files":"test/*Test.js","browsers":["ie/8..latest","chrome/25..latest","firefox/20..latest","safari/5..latest","opera/11.0..latest","iphone/6","ipad/6","android-browser/latest"]},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"aebf93add684fe4c43a15f327343f62d12a76496","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@1.0.0","scripts":{},"_shasum":"5ab5235893139a8a577e3b73326806a888e8bb86","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"5ab5235893139a8a577e3b73326806a888e8bb86","tarball":"https://registry.npmjs.org/predicates/-/predicates-1.0.0.tgz","integrity":"sha512-ah0yKQXnxMcuQfCJALt/CxULUCrHFQAWCnnxCFrhw0GEH3ujLs+/bTwDb3bgF4+TquQ+iS+ESf8CJZMXoMhQHQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQ/oypA0KvpS+8MVJf9KPmaznYnNvYwyPZHtQH02lT6AiEA6Ye0vjm7c9VxC6zZwqht45OtCweEhvhxwuB6Rjhh3Mc="}]},"directories":{}},"1.0.1":{"name":"predicates","version":"1.0.1","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","repository":{"type":"git","url":"https://github.com/wookieb/predicates"},"keywords":["predicates","predicate","type","check","assert","filter"],"dependencies":{},"devDependencies":{"browserify":"^8.x.x","chai":"^1.10.0","dmd-examples-highlight":"^0.1.x","eslint":"^0.10.x","glob":"^4.3.x","gulp":"^3.8.x","gulp-coverage":"^0.3.32","gulp-eslint":"^0.2.0","gulp-mocha":"^2.0.0","gulp-rename":"^1.2.0","gulp-size":"^1.1.0","gulp-uglify":"^1.0.2","jsdoc-to-markdown":"^0.5.x","mocha":"^2.0.x","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.0.0"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"9db7482d405e7ade637d0923e35974bd97d18eaf","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates","_id":"predicates@1.0.1","scripts":{},"_shasum":"fa30b07e3c8f4083d0dc09443d445f2d49ed3102","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"dist":{"shasum":"fa30b07e3c8f4083d0dc09443d445f2d49ed3102","tarball":"https://registry.npmjs.org/predicates/-/predicates-1.0.1.tgz","integrity":"sha512-/zN9VaPeB0G1VvvakQU+GVUSkRddjqe9MClKAfeFV19FYsYEK2t0BK3iW07JwlWiQg9qXBrtXAWN+ffI63rxsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIChothxM0WI92SKNtomr2exCwfBppt+i4TKae6b66ZHGAiEAwrSR+CB5SUduow811I5EhluJ9Sy1tRBxrf1Lfay/qDU="}]},"directories":{}},"2.0.0-rc1":{"name":"predicates","version":"2.0.0-rc1","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"scripts":{"compile":"rm -rf compiled && ./node_modules/.bin/tsc -p ./.config/tsconfig.json","prepublish":"npm run compile","prepack":"cp -r ./compiled/* .","postpack":"rm -f *.d.ts && rm -f *.js && rm -rf integer && rm -rf utils","lint":"tslint --config ./.config/tslint.json src/*.ts","test":"__TS_CONFIG__=./config/tsconfig-test.json ./node_modules/.bin/jest --config ./.config/jest.json","test:ci":"jest --config ./.config/jest.json --testResultsProcessor ./node_modules/jest-junit"},"engines":{"node":">=4.3"},"keywords":["predicates","predicate","type","check","assert","filter"],"files":["**/*.d.ts","**/*.js"],"dependencies":{},"devDependencies":{"@types/chai":"^3.5.2","@types/jest":"^19.2.4","@types/sinon":"^2.2.1","chai":"^1.10.0","jest":"^20.0.0","jest-junit":"^1.5.1","sinon":"^2.2.0","ts-jest":"^20.0.0","tslint":"^5.2.0","typescript":"^2.3.2"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"5f81965a344808ec79ce7ea69bb9109614f4fe0f","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates#readme","_id":"predicates@2.0.0-rc1","_npmVersion":"5.0.0","_nodeVersion":"8.0.0","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"dist":{"integrity":"sha512-ffSZW3wUSCLbrzRbUgwSma7+Vgt3d3O+CUJ7aGUL+dQN39hwiBFpuwBPrOcM1ioO6C/Rq1zwMzZuNU8Q8fysBA==","shasum":"cd86c5c7788135b7bb6f4653a40474ce2b170e9a","tarball":"https://registry.npmjs.org/predicates/-/predicates-2.0.0-rc1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICwiPl5752Pfo+JXsGDh+/oTrGx+/qihffuPkmLVW0AmAiEA1gewgCdYZ1+ijX2sbhN2kiKQKTy/COuVMH/VWBp+WZI="}]},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/predicates-2.0.0-rc1.tgz_1497212013961_0.4447995836380869"},"directories":{}},"2.0.0":{"name":"predicates","version":"2.0.0","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"scripts":{"compile":"rm -rf compiled && ./node_modules/.bin/tsc -p ./.config/tsconfig.json","prepublish":"npm run compile","prepack":"cp -r ./compiled/* .","postpack":"rm -f *.d.ts && rm -f *.js && rm -rf integer && rm -rf utils","lint":"tslint --config ./.config/tslint.json src/*.ts","test":"jest --config ./.config/jest.json","test:ci":"jest --config ./.config/jest.json --coverage --testResultsProcessor ./node_modules/jest-junit && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","gen-docs":"ts-node docs-gen/generator.ts > API.md"},"engines":{"node":">=4.3"},"keywords":["predicates","predicate","type","check","assert","filter"],"files":["*.d.ts","*.js","utils/*","integer/*","finite/*"],"dependencies":{"array-find":"^1.0.0"},"devDependencies":{"@types/chai":"^3.5.2","@types/doctrine":"0.0.3","@types/jest":"^19.2.4","@types/node":"^8.0.28","@types/sinon":"^2.2.1","chai":"^1.10.0","coveralls":"^2.13.1","doctrine":"^2.0.0","handlebars":"^4.0.10","jest":"^20.0.0","jest-junit":"^1.5.1","sinon":"^2.2.0","ts-jest":"^20.0.0","ts-simple-ast":"^0.72.2","tslint":"^5.2.0","typescript":"^2.3.2"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"3db89bef942909f776a78835b5f8b3d6348b84dd","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates#readme","_id":"predicates@2.0.0","_npmVersion":"5.1.0","_nodeVersion":"8.1.3","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"dist":{"integrity":"sha512-E0RBSpRlA0q4hqB1DpSXQIORPwd5LFoditeRWb5WJVEnQUNMowMdHjI7kqCNuEjM9QNYwv5WcrEkvHh1yYq1Kw==","shasum":"4f651371f80b37a335ff76146be20e79d6cb1d80","tarball":"https://registry.npmjs.org/predicates/-/predicates-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQKnO9Qf6ChWlv8MXT+12kuYQaCgCQA/Qg/55/LaM3lQIhALAAsoJU6JAxhjwPhQOwzCFUNHRObxMNmDKa38zDWjnU"}]},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/predicates-2.0.0.tgz_1508003243994_0.0497417573351413"},"directories":{}},"2.0.1":{"name":"predicates","version":"2.0.1","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"scripts":{"compile":"rm -rf compiled && ./node_modules/.bin/tsc -p ./.config/tsconfig.json","prepublish":"npm run compile","prepack":"cp -r ./compiled/* .","postpack":"rm -f *.d.ts && rm -f *.js && rm -rf integer && rm -rf utils","lint":"tslint --config ./.config/tslint.json src/*.ts","test":"jest --config ./.config/jest.json","test:ci":"jest --config ./.config/jest.json --coverage --testResultsProcessor ./node_modules/jest-junit && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","gen-docs":"ts-node docs-gen/generator.ts > API.md"},"engines":{"node":">=4.3"},"keywords":["predicates","predicate","type","check","assert","filter"],"files":["*.d.ts","*.js","utils/*","integer/*","finite/*"],"dependencies":{"array-find":"^1.0.0"},"devDependencies":{"@types/chai":"^3.5.2","@types/doctrine":"0.0.3","@types/jest":"^19.2.4","@types/node":"^8.0.28","@types/sinon":"^2.2.1","chai":"^1.10.0","coveralls":"^2.13.1","doctrine":"^2.0.0","handlebars":"^4.0.10","jest":"^20.0.0","jest-junit":"^1.5.1","sinon":"^2.2.0","ts-jest":"^20.0.0","ts-simple-ast":"^0.72.2","tslint":"^5.2.0","typescript":"^2.3.2"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"6e3e168c7b7d9345886780a19f2824e8fc5840c6","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates#readme","_id":"predicates@2.0.1","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"dist":{"integrity":"sha512-xi005dt+pSPviQU38yDCCBhI9hYI5kGqlcXDD5xmcYiQM1PYlwKXT9cXjFK5ShXsM+y5cFYIjUrQ2IMRAlDBww==","shasum":"6e2a7948dd94989b5ca64e0beecfbc729410f422","tarball":"https://registry.npmjs.org/predicates/-/predicates-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCD7oP4NHXRRqXCqwUbepIrC3p8+trOEbAPykiUQ0/OwQIfVkXUM7KqBQ+PbuLyFUQ2FH0w1jncVPf9TIckt30Mcw=="}]},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/predicates-2.0.1.tgz_1514669185790_0.4837285445537418"},"directories":{}},"2.0.2":{"name":"predicates","version":"2.0.2","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"scripts":{"compile":"rm -rf compiled && ./node_modules/.bin/tsc -p ./.config/tsconfig.json","prepublish":"npm run compile","prepack":"cp -r ./compiled/* .","postpack":"rm -f *.d.ts && rm -f *.js && rm -rf integer && rm -rf utils","lint":"tslint --config ./.config/tslint.json src/*.ts","test":"jest --config ./.config/jest.json","test:ci":"jest --config ./.config/jest.json --coverage --testResultsProcessor ./node_modules/jest-junit && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","gen-docs":"ts-node docs-gen/generator.ts > API.md"},"engines":{"node":">=4.3"},"keywords":["predicates","predicate","type","check","assert","filter"],"files":["*.d.ts","*.js","utils/*","integer/*","finite/*"],"dependencies":{"array-find":"^1.0.0"},"devDependencies":{"@types/chai":"^3.5.2","@types/doctrine":"0.0.3","@types/jest":"^19.2.4","@types/node":"^8.0.28","@types/sinon":"^2.2.1","chai":"^1.10.0","coveralls":"^2.13.1","doctrine":"^2.0.0","handlebars":"^4.0.10","jest":"^20.0.0","jest-junit":"^1.5.1","sinon":"^2.2.0","ts-jest":"^20.0.0","ts-simple-ast":"^0.72.2","tslint":"^5.2.0","typescript":"^2.3.2"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"66324a39fda75ee3c045d1bb1d1f1d9823e052e7","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates#readme","_id":"predicates@2.0.2","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"dist":{"integrity":"sha512-DTnZQQ6uViNCXlA+30JJl7e2x1WeuLhGLnrQFsK3a/q4RGO/0iDpHgSXcDHux7e9k2m7o05oFZZ8ERO53fwqKQ==","shasum":"86538652370439f5af74318ba1a0f120d416bbe1","tarball":"https://registry.npmjs.org/predicates/-/predicates-2.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXQ0HbC4W+/vdYO8rQNwsRUpk8fRl9CPulk8MI+JHQCQIhAOtyl6p67kA4bK+H0IkH9TtR9wQWhHLn7GoPm02cn+2L"}]},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/predicates-2.0.2.tgz_1516523183582_0.8301575111690909"},"directories":{}},"2.0.3":{"name":"predicates","version":"2.0.3","description":"Set of various predicates for type checking, assertions, filtering etc","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"scripts":{"compile":"rm -rf compiled && ./node_modules/.bin/tsc -p ./.config/tsconfig.json","prepublish":"npm run compile","prepack":"cp -r ./compiled/* .","postpack":"rm -f *.d.ts && rm -f *.js && rm -rf integer && rm -rf utils","lint":"tslint --config ./.config/tslint.json src/*.ts","test":"jest --config ./.config/jest.json","test:ci":"jest --config ./.config/jest.json --coverage --testResultsProcessor ./node_modules/jest-junit && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","gen-docs":"ts-node docs-gen/generator.ts > API.md"},"engines":{"node":">=4.3"},"keywords":["predicates","predicate","type","check","assert","filter"],"files":["*.d.ts","*.js","utils/*","integer/*","finite/*"],"dependencies":{"array-find":"^1.0.0"},"devDependencies":{"@types/chai":"^3.5.2","@types/doctrine":"0.0.3","@types/jest":"^19.2.4","@types/node":"^8.0.28","@types/sinon":"^2.2.1","chai":"^1.10.0","coveralls":"^2.13.1","doctrine":"^2.0.0","handlebars":"^4.0.10","jest":"^20.0.0","jest-junit":"^1.5.1","sinon":"^2.2.0","ts-jest":"^20.0.0","ts-simple-ast":"^0.72.2","tslint":"^5.2.0","typescript":"^2.7.0"},"author":{"name":"Łukasz Kużyński"},"license":"MIT","gitHead":"db6d3e631b69704590d4fdabccf99f94a8dc4669","bugs":{"url":"https://github.com/wookieb/predicates/issues"},"homepage":"https://github.com/wookieb/predicates#readme","_id":"predicates@2.0.3","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"},"dist":{"integrity":"sha512-eL+bhIiWrD+kx/olyYBcAFn258Oo9MTB7iehgBIaflVS8DBLuVtQvOpwgWwlya6YFUIiKaVoA3HaBNJuVNcyIA==","shasum":"05bd161cd3f88a7724fbcb05efa754ccdeb4f513","tarball":"https://registry.npmjs.org/predicates/-/predicates-2.0.3.tgz","fileCount":146,"unpackedSize":93330,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4D7+duaf8OKXA5u2hQN5CQLNiLsSsm59fHQnoLRkr6AiAgFUXYeNJQt94Z5UxS24P3NqKibUjAEDXEiVKGA/rQVQ=="}]},"maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/predicates_2.0.3_1518979785356_0.3910421186486024"},"_hasShrinkwrap":false}},"readme":"# Predicates\n[![Build Status](https://travis-ci.org/wookieb/predicates.svg)](https://travis-ci.org/wookieb/predicates)\n[![NPM version](https://badge.fury.io/js/predicates.svg)](http://badge.fury.io/js/predicates)\n[![Coverage Status](https://coveralls.io/repos/github/wookieb/predicates/badge.svg?branch=master)](https://coveralls.io/github/wookieb/predicates?branch=master)\n\nSet of various predicates for type checking, simple assertions, filtering etc.\n\n## Features\n* written in typescript (with [type guards](#type-guards) and function overloading)\n* well defined [API design principles](#api-design)\n* predicates description every predicate contains a proper description for easier debugging and automatic assertion generation\n* supports simple type checks with unnecessary verbosity\n* every predicate supports currying if possible\n\n## Install\n```\nnpm install predicates\n```\n## [Full API](API.md)\n\n## Example\n\n```js\nconst is = require('predicates');\n\nis.string(1); // false\nis.string('test'); // true\n\nis.undefinedOr(String, undefined); // true\nis.undefinedOr(String, 'string'); // true\nis.undefinedOr(is.string, undefined); // true\nis.undefinedOr(is.string, 'timmy'); // true\nis.undefinedOr(is.string)(undefined); // true\nis.undefinedOr(is.string)('timmy'); // true\n\nconst isPerson = is.structure({\n\tname: is.string,\n\tsurname: is.undefinedOr(is.string),\n\tage: is.number\n});\n\nisPerson({name: 'Tom', age: 10}); // true\nisPerson({surname: 'Welling', age: 100}); // false, lack of name property\n``` \n\n```js\nconst assertName = is.assert(is.string);\nconst assertSurname = is.assert(is.notBlank);\nconst assertAge = is.assert(is.undefinedOr(is.positive));\n\nconst Person = function(name, surname, age) {\n    assertName(name);\n    assertSurname(surname);\n    assertAge(age);\n}\n\nnew Person('Tom', 'Welling', 33); // OK!\nnew Person('Tom', 'Welling'); // OK!\nnew Person('Tom', '', 33); // Error: Surname must be a string and cannot be emptye\n```\n\n## API design\n\n### Generated predicates can be called with more than one argument\n\nMost of type checking, utility libraries force you use predicates with only one argument but _predicates_ doesn.t\nAdditionally _predicates_ preserves the context of function call which allows you to create even more powerful logic.\n\n\n```js\nconst is = require('predicates');\n\nconst isOkToModifyTags = is.all(\n    is.arrayOf(is.string), \n    function(tags, previousTags) {\n        // no need to save them again if they are the same as previous ones\n        return tags.join(',') !== previousTags.join(',');\n    }\n);\n\nModule.prototype.modifyTags = function(entityId, tags) {\n    var previousTags = getTags(entityId);\n    if (isOkToModifyTags(tags, previousTags)) {\n        this.saveTags(entityId, tags);\n    } else {\n        // no need to save them again if they are the same as previous ones\n    }\n}\n```\n\n### Prevents stupid mistakes (fail fast)\n_Predicates_ checks whether generated predicate is misconfigured and throws an error as fast as possible.\n\n```js\nis.startsWith(''); // Error: Prefix cannot be empty\n// since that would be true for all strings\n\nis.in([]); // Error: Collection cannot be empty\n// always false\n```\n\nThat's why it's a good practice to create predicates at the beginning of a module definition to quickly catch any mistake.\n\n```js\n// some module\nconst is = require('predicates');\nconst isImage = is.in([]); // Error: Collection cannot be empty\n\n// You don't need to run the whole application to get the error that your predicate is wrong\nexport class Module {\n    \n}\n```\n\n### Defined and generated predicates will never throw any error\nYou don't need to check the arguments provided to predicates to make sure they won't cause an error - _predicates_ does it for you.\n\n```js\nconst isDuck = is.hasProperty('quack');\n\nisDuck(undefined); // false - no error\nisDuck(1); // false - no error\nisDuck('duck'); // false - no error\n\nis.matches(/.*\\.ts/)(100); // false - no error\n```\n\nNOTE! This rule applies only for predicates defined in the library. Any user-defined predicate MAY throw errors (however I don't advise to do so) and _predicates_ will not catch them.\n\n```\nconst assertName = is.all(is.string, function(value) {\n    if (value === 'admin') {\n        throw new Error('Admin is a reserved user name');\n    }\n});\n\nassertName('admin'); // Error: Admin is a reserved user name\n```\n\n### Type guards \nEvery predicate (if possible) is a type guard\n```typescript\nif (is.string(value)) {\n   // at this point typescript compiler knows that value is a string \n}\n```\n\n### Core types are automatically translated to proper predicate\n\n```js\nis.property('foo', is.string)({foo: 'bar'}); // true\n\n// for less verbosity this is possible as well\nis.property('foo', String)({foo: 'bar'}); // true\nis.arrayOf(String)(['foo']); // true\n```\n","maintainers":[{"name":"wookieb","email":"lukasz.kuzynski@gmail.com"}],"time":{"modified":"2022-06-24T13:52:34.615Z","created":"2014-11-02T23:49:55.790Z","0.1.0":"2014-11-02T23:49:55.790Z","0.2.0":"2014-11-08T21:01:22.336Z","0.2.1":"2014-11-09T07:34:23.335Z","0.3.0":"2014-11-15T10:44:56.195Z","1.0.0-rc.1":"2014-12-10T12:24:26.187Z","1.0.0-rc.2":"2014-12-25T14:52:04.043Z","1.0.0":"2015-01-24T08:00:17.485Z","1.0.1":"2015-03-09T20:03:38.503Z","2.0.0-rc1":"2017-06-11T20:13:35.048Z","2.0.0":"2017-10-14T17:47:24.971Z","2.0.1":"2017-12-30T21:26:27.249Z","2.0.2":"2018-01-21T08:26:24.605Z","2.0.3":"2018-02-18T18:49:45.429Z"},"keywords":["predicates","predicate","type","check","assert","filter"],"author":{"name":"Łukasz Kużyński"},"license":"MIT","readmeFilename":"README.MD","homepage":"https://github.com/wookieb/predicates#readme","repository":{"type":"git","url":"git+https://github.com/wookieb/predicates.git"},"bugs":{"url":"https://github.com/wookieb/predicates/issues"},"users":{"chocolateboy":true,"satoru":true}}