-
Notifications
You must be signed in to change notification settings - Fork 1
/
repl.js
33 lines (26 loc) · 1.17 KB
/
repl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env -S deno run --allow-env=NODE_ENV
import sanctuary from "https://cdn.skypack.dev/sanctuary";
import _$ from "https://cdn.skypack.dev/sanctuary-def";
import { env as flutureEnv } from "https://cdn.skypack.dev/fluture-sanctuary-types";
export const PromiseType = _$.NullaryType("Promise")(
"https://github.com/identinet/identinet#Promise",
)([])((x) => S.type(x).name === "Promise");
const env = _$.env.concat(flutureEnv).concat([PromiseType]);
export const $ = _$;
export const S = sanctuary.create({
checkTypes: (typeof process !== "undefined" && process.env &&
process.env.NODE_ENV !== "production") ||
(typeof Deno !== "undefined" && Deno.env.get("NODE_ENV") !== "production"),
env,
});
export const def = _$.create({
checkTypes: (typeof process !== "undefined" && process.env &&
process.env.NODE_ENV !== "production") ||
(typeof Deno !== "undefined" && Deno.env.get("NODE_ENV") !== "production"),
env,
});
// assign all types to S.types, see https://github.com/sanctuary-js/sanctuary/issues/717
S.types = {};
sanctuary.map((t) => (S.types[t.name] = t))(env);
import * as Fluture from "https://cdn.skypack.dev/fluture";
export const F = Fluture;