@agoric/internal 0.3.3-dev-dd19d79.0 → 0.3.3-dev-d589873.0
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/package.json +3 -3
- package/src/method-tools.d.ts +1 -0
- package/src/method-tools.d.ts.map +1 -1
- package/src/method-tools.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/internal",
|
|
3
|
-
"version": "0.3.3-dev-
|
|
3
|
+
"version": "0.3.3-dev-d589873.0+d589873",
|
|
4
4
|
"description": "Externally unsupported utilities internal to agoric-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"lint:types": "tsc -p jsconfig.json"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agoric/zone": "0.2.3-dev-
|
|
23
|
+
"@agoric/zone": "0.2.3-dev-d589873.0+d589873",
|
|
24
24
|
"@endo/far": "^0.2.18",
|
|
25
25
|
"@endo/marshal": "^0.8.5",
|
|
26
26
|
"@endo/patterns": "^0.2.2",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d5898733a61b253fae863e4ad5531d9005cdacb0"
|
|
46
46
|
}
|
package/src/method-tools.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export function getMethodNames<K extends PropertyKey>(val: Record<K, any>): K[];
|
|
2
|
+
export function getStringMethodNames<K extends PropertyKey>(val: Record<K, any>): string[];
|
|
2
3
|
export function bindAllMethods<T extends Record<PropertyKey, any>>(obj: T): T;
|
|
3
4
|
//# sourceMappingURL=method-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAyCO,gFAoBN;
|
|
1
|
+
{"version":3,"file":"method-tools.d.ts","sourceRoot":"","sources":["method-tools.js"],"names":[],"mappings":"AAyCO,gFAoBN;AAUM,kFAFM,MAAM,EAAE,CAKlB;AA+BI,8EAeJ"}
|
package/src/method-tools.js
CHANGED
|
@@ -62,6 +62,18 @@ export const getMethodNames = val => {
|
|
|
62
62
|
};
|
|
63
63
|
harden(getMethodNames);
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* The subset of `getMethodNames` containing only string names, without symbols
|
|
67
|
+
*
|
|
68
|
+
* @template {PropertyKey} K
|
|
69
|
+
* @param {Record<K, any>} val
|
|
70
|
+
* @returns {string[]}
|
|
71
|
+
*/
|
|
72
|
+
export const getStringMethodNames = val =>
|
|
73
|
+
/** @type {string[]} */ (
|
|
74
|
+
getMethodNames(val).filter(name => typeof name === 'string')
|
|
75
|
+
);
|
|
76
|
+
|
|
65
77
|
/**
|
|
66
78
|
* TODO This function exists only to ease the
|
|
67
79
|
* https://github.com/Agoric/agoric-sdk/pull/5970 transition, from all methods
|