mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 11:51:10 +08:00
11 lines
402 B
TypeScript
11 lines
402 B
TypeScript
/// <reference types="node"/>;
|
|
import * as assert from "assert";
|
|
import { create, env } from "sanctuary";
|
|
|
|
const checkTypes = process.env["NODE_ENV"] !== "production";
|
|
const S = create({checkTypes, env});
|
|
|
|
assert.equal(S.map(S.concat('@'))(['foo', 'bar', 'baz']), ["@foo", "@bar", "@baz"]);
|
|
assert.equal(S.reduce(S.add)(0)([1, 2, 3, 4, 5]), 15);
|
|
assert.equal(S.flip(S.concat)('foo')('bar'), "barfoo");
|