a-sweet-lib
Advanced tools
Comparing version 0.1.2 to 0.1.3
declare module 'a-sweet-lib' { | ||
declare function compose(...fs: Array<(x: any) => any>): (x: any) => any | ||
declare function map(f: (x:any) => any): (x: any) => any | ||
declare function identity<A>(x: A): A | ||
declare function always<A>(x: A): () => A | ||
} |
{ | ||
"name": "a-sweet-lib", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,2 @@ | ||
// https://xaviervia.github.io/a-sweet-lib/#compose | ||
export default function (...fs: Array<(x: any) => any>) { | ||
@@ -2,0 +3,0 @@ return (x: any): any => |
@@ -0,1 +1,2 @@ | ||
// https://xaviervia.github.io/a-sweet-lib/#map | ||
export default (f: (x: any) => any) => (x: any):any => { | ||
@@ -2,0 +3,0 @@ switch (true) { |
// https://xaviervia.github.io/a-sweet-lib/#identity | ||
export default (x: any) => x | ||
export default function <T> (x: T): T { return x } |
@@ -0,9 +1,11 @@ | ||
import always from './an-always/an-always' | ||
import compose from './a-compose/a-compose' | ||
import identity from './an-identity/an-identity' | ||
import map from './a-map/a-map' | ||
import identity from './an-identity/an-identity' | ||
export default { | ||
always, | ||
compose, | ||
map, | ||
identity | ||
identity, | ||
map | ||
} |
@@ -0,6 +1,8 @@ | ||
import always from './an-always/example' | ||
import compose from './a-compose/example' | ||
import identity from './an-identity/example' | ||
import map from './a-map/example' | ||
import identity from './an-identity/example' | ||
describe('a-sweet-lib', function () { | ||
it('always', always) | ||
it('compose', compose) | ||
@@ -7,0 +9,0 @@ it('map', map) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12113
25
111