File tree Expand file tree Collapse file tree 7 files changed +87
-0
lines changed
Expand file tree Collapse file tree 7 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 22
33Additions and modifications to the specification are best proposed in issues.
44If there is support for a proposal, the next step is to submit a pull request.
5+
6+ When adding a type class to __ README.md__ , please update __ names__ then run:
7+
8+ ``` console
9+ $ npm run generate-js
10+ $ npm run generate-ts
11+ ```
Original file line number Diff line number Diff line change 1+ export const equals : 'fantasy-land/equals' ;
2+ export const lte : 'fantasy-land/lte' ;
3+ export const compose : 'fantasy-land/compose' ;
4+ export const id : 'fantasy-land/id' ;
5+ export const concat : 'fantasy-land/concat' ;
6+ export const empty : 'fantasy-land/empty' ;
7+ export const invert : 'fantasy-land/invert' ;
8+ export const filter : 'fantasy-land/filter' ;
9+ export const map : 'fantasy-land/map' ;
10+ export const contramap : 'fantasy-land/contramap' ;
11+ export const ap : 'fantasy-land/ap' ;
12+ export const of : 'fantasy-land/of' ;
13+ export const alt : 'fantasy-land/alt' ;
14+ export const zero : 'fantasy-land/zero' ;
15+ export const reduce : 'fantasy-land/reduce' ;
16+ export const traverse : 'fantasy-land/traverse' ;
17+ export const chain : 'fantasy-land/chain' ;
18+ export const chainRec : 'fantasy-land/chainRec' ;
19+ export const extend : 'fantasy-land/extend' ;
20+ export const extract : 'fantasy-land/extract' ;
21+ export const bimap : 'fantasy-land/bimap' ;
22+ export const promap : 'fantasy-land/promap' ;
Original file line number Diff line number Diff line change 1+ equals
2+ lte
3+ compose
4+ id
5+ concat
6+ empty
7+ invert
8+ filter
9+ map
10+ contramap
11+ ap
12+ of
13+ alt
14+ zero
15+ reduce
16+ traverse
17+ chain
18+ chainRec
19+ extend
20+ extract
21+ bimap
22+ promap
Original file line number Diff line number Diff line change 2929 "files" : [
3030 " /LICENSE" ,
3131 " /README.md" ,
32+ " /index.d.ts" ,
3233 " /index.js" ,
3334 " /package.json"
3435 ],
3536 "main" : " index.js" ,
37+ "types" : " index.d.ts" ,
3638 "scripts" : {
3739 "doctest" : " sanctuary-doctest" ,
40+ "generate-js" : " scripts/generate-js" ,
41+ "generate-ts" : " scripts/generate-ts" ,
3842 "lint" : " sanctuary-lint" ,
3943 "release" : " sanctuary-release" ,
4044 "test" : " npm run lint && sanctuary-test && npm run doctest"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euf -o pipefail
3+
4+ cat > index.js << EOF
5+ (function() {
6+
7+ 'use strict';
8+
9+ var mapping = {
10+ $( awk ' { printf (NR > 1 ? ",\n " : "") $0 ": \047fantasy-land/" $0 "\047" }' names)
11+ };
12+
13+ /* istanbul ignore else */
14+ if (typeof module === 'object' && typeof module.exports === 'object') {
15+ module.exports = mapping;
16+ } else {
17+ self.FantasyLand = mapping;
18+ }
19+
20+ } ());
21+ EOF
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euf -o pipefail
3+
4+ awk ' { print "export const " $0 ": \047fantasy-land/" $0 "\047;" }' names > index.d.ts
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euf -o pipefail
3+
4+ node_modules/.bin/sanctuary-lint " $@ "
5+
6+ scripts/generate-js && git diff --exit-code index.js
7+ scripts/generate-ts && git diff --exit-code index.d.ts
You can’t perform that action at this time.
0 commit comments