-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
derive index.js and index.d.ts from canonical list of method names
- Loading branch information
1 parent
8cf6a3a
commit ee102dc
Showing
7 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export const equals: 'fantasy-land/equals'; | ||
export const lte: 'fantasy-land/lte'; | ||
export const compose: 'fantasy-land/compose'; | ||
export const id: 'fantasy-land/id'; | ||
export const concat: 'fantasy-land/concat'; | ||
export const empty: 'fantasy-land/empty'; | ||
export const invert: 'fantasy-land/invert'; | ||
export const filter: 'fantasy-land/filter'; | ||
export const map: 'fantasy-land/map'; | ||
export const contramap: 'fantasy-land/contramap'; | ||
export const ap: 'fantasy-land/ap'; | ||
export const of: 'fantasy-land/of'; | ||
export const alt: 'fantasy-land/alt'; | ||
export const zero: 'fantasy-land/zero'; | ||
export const reduce: 'fantasy-land/reduce'; | ||
export const traverse: 'fantasy-land/traverse'; | ||
export const chain: 'fantasy-land/chain'; | ||
export const chainRec: 'fantasy-land/chainRec'; | ||
export const extend: 'fantasy-land/extend'; | ||
export const extract: 'fantasy-land/extract'; | ||
export const bimap: 'fantasy-land/bimap'; | ||
export const promap: 'fantasy-land/promap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
equals | ||
lte | ||
compose | ||
id | ||
concat | ||
empty | ||
invert | ||
filter | ||
map | ||
contramap | ||
ap | ||
of | ||
alt | ||
zero | ||
reduce | ||
traverse | ||
chain | ||
chainRec | ||
extend | ||
extract | ||
bimap | ||
promap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -euf -o pipefail | ||
|
||
cat >index.js <<EOF | ||
(function() { | ||
'use strict'; | ||
var mapping = { | ||
$(awk '{ printf (NR > 1 ? ",\n " : "") $0 ": \047fantasy-land/" $0 "\047" }' names) | ||
}; | ||
/* istanbul ignore else */ | ||
if (typeof module === 'object' && typeof module.exports === 'object') { | ||
module.exports = mapping; | ||
} else { | ||
self.FantasyLand = mapping; | ||
} | ||
} ()); | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -euf -o pipefail | ||
|
||
awk '{ print "export const " $0 ": \047fantasy-land/" $0 "\047;" }' names >index.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -euf -o pipefail | ||
|
||
node_modules/.bin/sanctuary-lint "$@" | ||
|
||
scripts/generate-js && git diff --exit-code index.js | ||
scripts/generate-ts && git diff --exit-code index.d.ts |