{"_id":"4.5","_rev":"6-d6230033cd928f33f9d762b704f9d390","name":"4.5","description":"Monadic test assertions","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"4.5","version":"0.1.0","description":"Monadic test assertions","main":"lib/index.js","module":"lib.es2015/index.js","jsnext:main":"lib.es2015/index.js","typings":"lib/index.d.ts","scripts":{"build":"yarn build:commonjs && yarn build:es2015","build:commonjs":"tsc -P .config/tsconfig.commonjs.json","build:es2015":"tsc -P .config/tsconfig.es2015.json","changelog":"conventional-changelog -i CHANGELOG.md -s -r 0 -p angular","clean":"rimraf lib lib.es2015","commit":"git-cz","commitmsg":"validate-commit-msg","postchangelog":"git add CHANGELOG.md && git commit -m 'docs(CHANGELOG): amend changelog'","postversion":"npm run changelog && git push origin master --tags && npm publish","preversion":"yarn test && yarn build","release:major":"npm version major -m 'chore(package): v%s'","release:minor":"npm version minor -m 'chore(package): v%s'","test":"yarn test:lint && yarn test:unit","test:lint":"tslint src/**/*.ts","test:unit":"ts-node .scripts/ts-mocha.ts"},"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"keywords":["most","mostjs","reactive","functional","http","xhr"],"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/TylorS/4.5/issues"},"homepage":"https://github.com/TylorS/4.5#readme","devDependencies":{"@motorcycle/tslint":"^1.3.0","@types/glob-expand":"^0.0.30","@types/mocha":"^2.2.39","@types/node":"^7.0.5","@types/superagent":"^2.0.36","commitizen":"^2.9.5","conventional-changelog-cli":"^1.2.0","cz-conventional-changelog":"^1.2.0","glob-expand":"^0.2.1","husky":"^0.13.1","mocha":"^3.2.0","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","typescript":"^2.1.6","validate-commit-msg":"^2.11.1"},"dependencies":{"@typed/curry":"^1.0.1","typed-colors":"^1.0.0"},"gitHead":"52ab7074e571eee40bfabacc43a1900f94898aa9","_id":"4.5@0.1.0","_shasum":"081d771e89c9d0301e0bb6f41f9d52730644f9e2","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"tylors","email":"tlsteinberger167@gmail.com"},"dist":{"shasum":"081d771e89c9d0301e0bb6f41f9d52730644f9e2","tarball":"https://registry.npmjs.org/4.5/-/4.5-0.1.0.tgz","integrity":"sha512-psIN96deoZvpHr2JUonBV0fW1LvCrOXXcBuE9ZaDUFzoGXOSaJbxjk+lEEQuGJRooT44lziCtX5v6vkA1DkUGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgJJ1EgI2MrP/gDh2cZFFlUa8gtvLk1YdAGzGUHs0gvAiB3qFOC+aBgXNRNoWlWF/QHL702P/d+fQcfi4hRzcHfNw=="}]},"maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/4.5-0.1.0.tgz_1486882523484_0.5834565311670303"}},"0.2.0":{"name":"4.5","version":"0.2.0","description":"Monadic test assertions","main":"lib/index.js","module":"lib.es2015/index.js","jsnext:main":"lib.es2015/index.js","typings":"lib/index.d.ts","scripts":{"build":"yarn build:commonjs && yarn build:es2015","build:commonjs":"tsc -P .config/tsconfig.commonjs.json","build:es2015":"tsc -P .config/tsconfig.es2015.json","changelog":"conventional-changelog -i CHANGELOG.md -s -r 0 -p angular","clean":"rimraf lib lib.es2015","commit":"git-cz","commitmsg":"validate-commit-msg","postchangelog":"git add CHANGELOG.md && git commit -m 'docs(CHANGELOG): amend changelog'","postversion":"npm run changelog && git push origin master --tags && npm publish","preversion":"yarn test && yarn build","release:major":"npm version major -m 'chore(package): v%s'","release:minor":"npm version minor -m 'chore(package): v%s'","test":"yarn test:lint && yarn test:unit","test:lint":"tslint src/**/*.ts","test:unit":"ts-node .scripts/ts-mocha.ts"},"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"keywords":["most","mostjs","reactive","functional","http","xhr"],"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/TylorS/4.5/issues"},"homepage":"https://github.com/TylorS/4.5#readme","devDependencies":{"@motorcycle/tslint":"^1.3.0","@types/glob-expand":"^0.0.30","@types/mocha":"^2.2.39","@types/node":"^7.0.5","@types/superagent":"^2.0.36","commitizen":"^2.9.5","conventional-changelog-cli":"^1.2.0","cz-conventional-changelog":"^1.2.0","glob-expand":"^0.2.1","husky":"^0.13.1","mocha":"^3.2.0","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","typescript":"^2.1.6","validate-commit-msg":"^2.11.1"},"dependencies":{"@typed/curry":"^1.0.1","typed-colors":"^1.0.0"},"gitHead":"84b4e40376aa678f2b519a4bbf01d83666fe4a5a","_id":"4.5@0.2.0","_shasum":"ead554580944226378525613b5e5203408755f3b","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"tylors","email":"tlsteinberger167@gmail.com"},"dist":{"shasum":"ead554580944226378525613b5e5203408755f3b","tarball":"https://registry.npmjs.org/4.5/-/4.5-0.2.0.tgz","integrity":"sha512-slFHCtA6NFD8b4cV6NCHEFFURl8FCTTuvclnG6BYrQaPrfyVCCVNWaaooHj63rB0A87mZHEkadncR8W1ROAk1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFaGqtdhqESq/u7I98V0pQ0ZnIx4eI29U8wlVXRlfOijAiBkXu0OGqA8bOIuMFNCsxlFrQUvP2w2RvBiPsUXOYA29g=="}]},"maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/4.5-0.2.0.tgz_1486884221022_0.4307580473832786"}},"0.3.0":{"name":"4.5","version":"0.3.0","description":"Monadic test assertions","main":"lib/index.js","module":"lib.es2015/index.js","jsnext:main":"lib.es2015/index.js","typings":"lib/index.d.ts","scripts":{"build":"yarn build:commonjs && yarn build:es2015","build:commonjs":"tsc -P .config/tsconfig.commonjs.json","build:es2015":"tsc -P .config/tsconfig.es2015.json","changelog":"conventional-changelog -i CHANGELOG.md -s -r 0 -p angular","clean":"rimraf lib lib.es2015","commit":"git-cz","commitmsg":"validate-commit-msg","postchangelog":"git add CHANGELOG.md && git commit -m 'docs(CHANGELOG): amend changelog'","postversion":"npm run changelog && git push origin master --tags && npm publish","preversion":"yarn test && yarn build","release:major":"npm version major -m 'chore(package): v%s'","release:minor":"npm version minor -m 'chore(package): v%s'","test":"yarn test:lint && yarn test:unit","test:lint":"tslint src/**/*.ts","test:unit":"ts-node .scripts/ts-mocha.ts"},"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"keywords":["most","mostjs","reactive","functional","http","xhr"],"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/TylorS/4.5/issues"},"homepage":"https://github.com/TylorS/4.5#readme","devDependencies":{"@motorcycle/tslint":"^1.3.0","@types/glob-expand":"^0.0.30","@types/mocha":"^2.2.39","@types/node":"^7.0.5","@types/superagent":"^2.0.36","commitizen":"^2.9.5","conventional-changelog-cli":"^1.2.0","cz-conventional-changelog":"^1.2.0","glob-expand":"^0.2.1","husky":"^0.13.1","mocha":"^3.2.0","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","typescript":"^2.1.6","validate-commit-msg":"^2.11.1"},"dependencies":{"@typed/curry":"^1.0.1","typed-colors":"^1.0.0"},"gitHead":"22bba1163454c06f4decc2344fa0f623258cd522","_id":"4.5@0.3.0","_shasum":"d33bea996b5c18e4bf6ee4d752861c6579dd1b1e","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"tylors","email":"tlsteinberger167@gmail.com"},"dist":{"shasum":"d33bea996b5c18e4bf6ee4d752861c6579dd1b1e","tarball":"https://registry.npmjs.org/4.5/-/4.5-0.3.0.tgz","integrity":"sha512-H0hY1rMVI94vPlYitUs6qzUl/PnUq7+OzYMwWdeuglyhDQ8MLBqq7OkhnpBv++7NFtBFepp0o/xju+Lth6aHNg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3ntFKA7IcqjmxvUrKqKDg37vYHsW+5A9cFC5Wb+2kcAiEAvKmeRa2XeRxIT2PfSVPu/x2kG04BT/3b04IQmtHz9uY="}]},"maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/4.5-0.3.0.tgz_1487327124780_0.6344415803905576"}},"0.4.0":{"name":"4.5","version":"0.4.0","description":"Monadic test assertions","main":"lib/index.js","module":"lib.es2015/index.js","jsnext:main":"lib.es2015/index.js","typings":"lib/index.d.ts","scripts":{"build":"yarn build:commonjs && yarn build:es2015","build:commonjs":"tsc -P .config/tsconfig.commonjs.json","build:es2015":"tsc -P .config/tsconfig.es2015.json","changelog":"conventional-changelog -i CHANGELOG.md -s -r 0 -p angular","clean":"rimraf lib lib.es2015","commit":"git-cz","commitmsg":"validate-commit-msg","postchangelog":"git add CHANGELOG.md && git commit -m 'docs(CHANGELOG): amend changelog'","postversion":"npm run changelog && git push origin master --tags && npm publish","preversion":"yarn test && yarn build","release:major":"npm version major -m 'chore(package): v%s'","release:minor":"npm version minor -m 'chore(package): v%s'","test":"yarn test:lint && yarn test:unit","test:lint":"tslint src/**/*.ts","test:unit":"ts-node .scripts/ts-mocha.ts"},"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"keywords":["most","mostjs","reactive","functional","http","xhr"],"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/TylorS/4.5/issues"},"homepage":"https://github.com/TylorS/4.5#readme","devDependencies":{"@motorcycle/tslint":"^1.3.0","@types/glob-expand":"^0.0.30","@types/mocha":"^2.2.39","@types/node":"^7.0.5","@types/superagent":"^2.0.36","commitizen":"^2.9.5","conventional-changelog-cli":"^1.2.0","cz-conventional-changelog":"^1.2.0","glob-expand":"^0.2.1","husky":"^0.13.1","mocha":"^3.2.0","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","typescript":"^2.1.6","validate-commit-msg":"^2.11.1"},"dependencies":{"@typed/curry":"^1.0.1","typed-colors":"^1.0.0"},"gitHead":"24dabad59efe5c26c43733012105095ebf126e28","_id":"4.5@0.4.0","_shasum":"9ec025a3e64d962b7a5c2826e4e929cc6bdbacc6","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"tylors","email":"tlsteinberger167@gmail.com"},"dist":{"shasum":"9ec025a3e64d962b7a5c2826e4e929cc6bdbacc6","tarball":"https://registry.npmjs.org/4.5/-/4.5-0.4.0.tgz","integrity":"sha512-EIBEy2/Oy5RPAqSoQC1Wy2x5ngt+g3ns12hNriYpc2RqNxJsBRXeoLMwSy6sw85VE1ZJdPMC3MGBE2NxlH9D7w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1gZixLNVv5KrSXlNs10sK/v9nf4LsQ3Z7SaeR0PRwrAIhAKm12DvNQu/26vMkDW2UzrhtAV4oMaIyzupI/SQKcPih"}]},"maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/4.5-0.4.0.tgz_1487328835480_0.22631035512313247"}},"0.5.0":{"name":"4.5","version":"0.5.0","description":"Monadic test assertions","main":"lib/index.js","module":"lib.es2015/index.js","jsnext:main":"lib.es2015/index.js","typings":"lib/index.d.ts","scripts":{"build":"yarn build:commonjs && yarn build:es2015","build:commonjs":"tsc -P .config/tsconfig.commonjs.json","build:es2015":"tsc -P .config/tsconfig.es2015.json","changelog":"conventional-changelog -i CHANGELOG.md -s -r 0 -p angular","clean":"rimraf lib lib.es2015","commit":"git-cz","commitmsg":"validate-commit-msg","postchangelog":"git add CHANGELOG.md && git commit -m 'docs(CHANGELOG): amend changelog'","postversion":"npm run changelog && git push origin master --tags && npm publish","preversion":"yarn test && yarn build","release:major":"npm version major -m 'chore(package): v%s'","release:minor":"npm version minor -m 'chore(package): v%s'","test":"yarn test:lint && yarn test:unit","test:lint":"tslint src/**/*.ts","test:unit":"ts-node .scripts/ts-mocha.ts"},"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"keywords":["most","mostjs","reactive","functional","http","xhr"],"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/TylorS/4.5/issues"},"homepage":"https://github.com/TylorS/4.5#readme","devDependencies":{"@motorcycle/tslint":"^1.3.0","@types/glob-expand":"^0.0.30","@types/mocha":"^2.2.39","@types/node":"^7.0.5","@types/superagent":"^2.0.36","commitizen":"^2.9.5","conventional-changelog-cli":"^1.2.0","cz-conventional-changelog":"^1.2.0","glob-expand":"^0.2.1","husky":"^0.13.1","mocha":"^3.2.0","rimraf":"^2.5.4","ts-node":"^2.1.0","tslint":"^4.4.2","typescript":"^2.1.6","validate-commit-msg":"^2.11.1"},"dependencies":{"@typed/curry":"^1.0.1","typed-colors":"^1.0.0"},"gitHead":"3886a6d182cc6fe4bbc45f93cbd1339705a6fa0c","_id":"4.5@0.5.0","_shasum":"4146ebed6207cb80de1820139683f61a57dbba2b","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"tylors","email":"tlsteinberger167@gmail.com"},"dist":{"shasum":"4146ebed6207cb80de1820139683f61a57dbba2b","tarball":"https://registry.npmjs.org/4.5/-/4.5-0.5.0.tgz","integrity":"sha512-WNWxlptQtbKzE5NJihm4tLtLqVIKADGVRnwXZ6vS6llF8ilBKfKxSn0z3zJx7GpXErDKnECZqHtxNz7NgBtpAQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOMQ6urHxJagFtpAg0zlxz07F6wKWivLETgTlJhFPnJAIhAM7tks7Aa63K3UXiKV+zXbxqp0Zje7qo5QQqTSxKPFeZ"}]},"maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/4.5-0.5.0.tgz_1487342181592_0.6979709104634821"}}},"readme":"# 4.5\n\n> Functional, curried, and monadic Assertions\n\nThe functional assertions library you've been missing!\nYour tests should follow the same practices you put into your codebase.\nIf you prefer functional style APIs and practices in JavaScript or TypeScript\nyour tests likely don't look too much like your applications. This library aims\nto solve this with functionally-oriented assertions that are lazy and monadic.\n\n## Table of Contents\n\n- [Installation](#let-me-have-it)\n- [API](#api)\n  - [Assertions](#assertions)\n  - [Combinators](#combinators)\n  - [Interpreters](#interpreters)\n- [Types](#types)\n\n## Let me have it!\n```sh\nyarn add 4.5\n# or\nnpm install --save 4.5\n```\n\n## API\n\n- All functions of arity 2 or more are curried.\n- All types are defined below in the [Types](#types) section.\n\n### Assertions\n\nCreate assertions that can be verified. Assertions are **lazy** by default, which\nmeans, they don't *do* anything unless specifically asked to verify themselves.\n\n#### `equals :: a → a → Assertion a`\n\nCreates an assertion that, when verified, will check **value** equality of\nitems, including deep equality of objects or arrays.\n\n#### `is :: a → a → Assertion a`\n\nCreates an assertion that, when verified, will check **reference** equality of\nitems.\n\n#### `pass :: a → Assertion a` (Applicative)\n\nCreates an assertion that, when verified, will always succeed with the given\nvalue.\n\nThis is `4.5`'s implementation of `Applicative` often called `of` or `just`\nin many other libraries.\n\n#### `fail :: * → Assertion *`\n\nCreates an assertion that, when verified, will always fail with a string\nrepresentation of the given value.\n\n#### `throws :: (* → *) → Assertion Error`\n\nCreates an assertion that verifies a given function throws an error.\n\n### Combinators\n\nCombinators are what allow you to compose your assertions and express many\naspects of your tests in a declarative and expressive way.\n\n#### `map :: (a → b) → Assertion a → Assertion b` (Functor)\n\nGiven a function from one value `a` to another value `b` and an assertion\nof `a` returns a new assertion of `b`.\n\n#### `ap :: Assertion (a → b) → Assertion a → Assertion b` (Apply)\n\nGiven an assertion of a function of type `a` to type `b` and an assertion of\ntype `a` returns an assertion of type `b`\n\n#### `chain :: (a → Assertion b) → Assertion a → Assertion b` (Monad)\n\nGiven a function from one value `a` to `Assertion b` and an assertion of type `a`,\nreturns an assertion of type `b`\n\n#### `bimap :: ([char] → [char]) → (a → b) → Assertion a → Assertion b` (Bifunctor)\n\nThe first parameter is a function mapping one string to another upon unsuccessful\nverification of the provided assertion.\n\nThe second parameter is a function mapping a value `a` to a value of `b` upon\nsuccessful verification of the provided assertion.\n\nThe third parameter is an assertion of type `a`.\n\nReturns an assertion of type `b`. If the assertion given as the third parameter\nis unsuccessfully verified it will also fail to be verified. If the assertion\ngiven as the third parameter is verified it will also successfully verify.\n\n#### `concat:: Assertion a → Assertion a → Assertion a`\n\nConcatenate 2 assertions together. The second assertion passed to concat\nwill not be verified if the first assertion failed.\n\n### Interpreters\n\nInterpreters are functions that *verify* assertions.\n\n#### `assert :: Assertion a → unit`\n\nGiven an assertion that can be successfully verified as correct, it will return\n`void`/`undefined`. Given an assertion that can **not** be verified as correct,\nit will throw an Error. This option is perfect for test frameworks that use\nthrown errors to signal test status, such as Mocha.\n\n## Types\n\n```typescript\nexport interface Assertion<T> {\n  verify(verification: Verification<T>): void;\n}\n\nexport interface Verification<T> {\n  success(actual: T): any;\n  failure(message: string): any;\n}\n```","maintainers":[{"name":"tylors","email":"tlsteinberger167@gmail.com"}],"time":{"modified":"2022-06-12T14:07:35.571Z","created":"2017-02-12T06:55:24.135Z","0.1.0":"2017-02-12T06:55:24.135Z","0.2.0":"2017-02-12T07:23:41.699Z","0.3.0":"2017-02-17T10:25:26.920Z","0.4.0":"2017-02-17T10:53:56.286Z","0.5.0":"2017-02-17T14:36:22.217Z"},"homepage":"https://github.com/TylorS/4.5#readme","keywords":["most","mostjs","reactive","functional","http","xhr"],"repository":{"type":"git","url":"git+https://github.com/TylorS/4.5.git"},"author":{"name":"Tylor Steinberger","email":"tlsteinberger167@gmail.com"},"bugs":{"url":"https://github.com/TylorS/4.5/issues"},"license":"MIT","readmeFilename":"README.md"}