@longlast/function-provenance 0.0.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/README.md +26 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +5 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `@longlast/function-provenance`
|
|
2
|
+
|
|
3
|
+
Imbues partially-applied functions with knowledge of their origins.
|
|
4
|
+
|
|
5
|
+
Specifically, partially-applied functions get a reference to their original,
|
|
6
|
+
unapplied function, and a method that returns their bound arguments.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
Choose your favorite package manager:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm add @longlast/function-provenance
|
|
14
|
+
pnpm add @longlast/function-provenance
|
|
15
|
+
yarn add @longlast/function-provenance
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Use
|
|
19
|
+
|
|
20
|
+
TODO
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
[Browse the docs on longlast.js.org][docs].
|
|
25
|
+
|
|
26
|
+
[docs]: https://longlast.js.org/function-provenance/
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module function-provenance
|
|
3
|
+
* @hidden
|
|
4
|
+
*/
|
|
5
|
+
import type { $getBoundArguments, $unapplied } from "@longlast/symbols";
|
|
6
|
+
declare const $nonUserConstructible: unique symbol;
|
|
7
|
+
export interface FunctionProvenance {
|
|
8
|
+
[$getBoundArguments](): unknown[];
|
|
9
|
+
[$unapplied]: AnyFunction;
|
|
10
|
+
displayName: string;
|
|
11
|
+
[$nonUserConstructible]: true;
|
|
12
|
+
}
|
|
13
|
+
type AnyFunction = (...args: any[]) => any;
|
|
14
|
+
export {};
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@longlast/function-provenance",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Imbues partially-applied functions with knowledge of their origins",
|
|
5
|
+
"homepage": "https://longlast.js.org/",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Ben Christel (https://benchristel.com/)",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"repository": "github:benchristel/longlast",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"imports": {
|
|
17
|
+
"#@longlast/function-provenance": "./src/index.ts"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@longlast/symbols": "^1.1.0"
|
|
21
|
+
}
|
|
22
|
+
}
|