@bodil/core 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fun.d.ts CHANGED
@@ -2,3 +2,11 @@
2
2
  * Create a function that always returns `value`.
3
3
  */
4
4
  export declare function always<A>(value: A): () => A;
5
+ /**
6
+ * The identity function: it just returns its argument unchanged.
7
+ */
8
+ export declare function id<A>(value: A): A;
9
+ /**
10
+ * A function which does nothing and returns `void`.
11
+ */
12
+ export declare function nop(): void;
package/dist/fun.js CHANGED
@@ -4,4 +4,16 @@
4
4
  export function always(value) {
5
5
  return () => value;
6
6
  }
7
+ /**
8
+ * The identity function: it just returns its argument unchanged.
9
+ */
10
+ export function id(value) {
11
+ return value;
12
+ }
13
+ /**
14
+ * A function which does nothing and returns `void`.
15
+ */
16
+ export function nop() {
17
+ // nop
18
+ }
7
19
  //# sourceMappingURL=fun.js.map
package/dist/fun.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"fun.js","sourceRoot":"","sources":["../src/fun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,MAAM,CAAI,KAAQ;IAC9B,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"fun.js","sourceRoot":"","sources":["../src/fun.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,MAAM,CAAI,KAAQ;IAC9B,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,EAAE,CAAI,KAAQ;IAC1B,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG;IACf,MAAM;AACV,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodil/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "My TypeScript standard library",
5
5
  "repository": {
6
6
  "type": "git",
package/src/fun.ts CHANGED
@@ -4,3 +4,17 @@
4
4
  export function always<A>(value: A): () => A {
5
5
  return () => value;
6
6
  }
7
+
8
+ /**
9
+ * The identity function: it just returns its argument unchanged.
10
+ */
11
+ export function id<A>(value: A): A {
12
+ return value;
13
+ }
14
+
15
+ /**
16
+ * A function which does nothing and returns `void`.
17
+ */
18
+ export function nop(): void {
19
+ // nop
20
+ }