├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── main.yml ├── .gitignore ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docs ├── _config.yml ├── index.md └── modules │ ├── Either.ts.md │ ├── Option.ts.md │ ├── index.md │ ├── index.ts.md │ └── laws.ts.md ├── jest.config.js ├── package-lock.json ├── package.json ├── src ├── Either.ts ├── Option.ts ├── index.ts └── laws.ts ├── test ├── index.ts └── tsconfig.json ├── tsconfig.json └── tslint.json /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Do you want to request a _feature_ or report a _bug_?** 2 | 3 | **What is the current behavior?** 4 | 5 | **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://codesandbox.io/ or similar.** 6 | 7 | **What is the expected behavior?** 8 | 9 | **Which versions of fp-ts-laws, and which browser and OS are affected by this issue? Did this work in previous versions of fp-ts-laws?** 10 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Before submitting a pull request,** please make sure the following is done: 2 | 3 | - Fork [the repository](https://github.com/gcanti/fp-ts-laws) and create your branch from `master`. 4 | - Run `npm install` in the repository root. 5 | - If you've fixed a bug or added code that should be tested, add tests! 6 | - Ensure the test suite passes (`npm test`). 7 | 8 | **Note**. If you find a typo in the **documentation**, make sure to modify the corresponding source (docs are generated). 9 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | strategy: 17 | matrix: 18 | node-version: [16.17.1] 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v1 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | - run: npm install 27 | - run: npm run build --if-present 28 | - run: npm test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | node_modules 3 | lib 4 | dev 5 | coverage 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "./node_modules/typescript/lib", 3 | "prettier.printWidth": 120, 4 | "prettier.semi": false, 5 | "prettier.singleQuote": true, 6 | "tslint.enable": true 7 | } 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | > **Tags:** 4 | > 5 | > - [New Feature] 6 | > - [Bug Fix] 7 | > - [Breaking Change] 8 | > - [Documentation] 9 | > - [Internal] 10 | > - [Polish] 11 | > - [Experimental] 12 | 13 | **Note**: Gaps between patch versions are faulty/broken releases. 14 | **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice. 15 | 16 | # 0.3.0 17 | 18 | - **Breaking Change** 19 | - upgrade `fast-check` dependency to v2 and move to `peerDependencies`, closes #9 (@gcanti) 20 | 21 | # 0.2.1 22 | 23 | - **Polish** 24 | - `Functor` 25 | - better _composition law_ test (@gcanti) 26 | 27 | # 0.2.0 28 | 29 | - **Breaking Change** 30 | - upgrade to `fp-ts@2.x` (@gcanti) 31 | - remove `lib/Validation` module (@gcanti) 32 | - rename `setoid` law to `eq` (@gcanti) 33 | 34 | # 0.1.0 35 | 36 | - **Breaking Change** 37 | - `Functor`, `Apply`, `Applicative` and `Monad` laws are now curried (@gcanti) 38 | 39 | # 0.0.3 40 | 41 | - **New Feature** 42 | - add missing derivedAp test to monad (@giogonzo) 43 | - extract setoid, ord, semigroup, monoid, semiring, ring, field laws (@giogonzo) 44 | 45 | # 0.0.2 46 | 47 | - **New Feature** 48 | - add `Functor` laws (@gcanti) 49 | - add `Apply`, `Applicative`, `Chain`, `Monad` laws (@giogonzo) 50 | 51 | # 0.0.1 52 | 53 | Initial release 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-present Giulio Canti 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |