@bodil/core 0.2.0 → 0.2.1

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,7 @@
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;
package/dist/fun.js CHANGED
@@ -4,4 +4,10 @@
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
+ }
7
13
  //# 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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodil/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "My TypeScript standard library",
5
5
  "repository": {
6
6
  "type": "git",
package/src/fun.ts CHANGED
@@ -4,3 +4,10 @@
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
+ }