@laudebugs/types 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/package.json +22 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.mjs +0 -12
- package/lib/constructable.d.ts +0 -1
- package/lib/deep-partial.d.ts +0 -3
- package/lib/filtered-keys.d.ts +0 -2
- package/lib/filtered-type.d.ts +0 -3
- package/lib/get-constructor-params.d.ts +0 -2
- package/lib/get-enum-values.d.ts +0 -16
- package/lib/index.d.ts +0 -7
- package/lib/value-of.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laudebugs/types",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"type": "commonjs"
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/laudebugs/laudebugs/tree/main/packages/types"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"typescript",
|
|
16
|
+
"types",
|
|
17
|
+
"utilities"
|
|
18
|
+
],
|
|
19
|
+
"author": "laudebugs",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/laudebugs/laudebugs/issues"
|
|
23
|
+
},
|
|
24
|
+
"homepage": "https://github.com/laudebugs/laudebugs/tree/main/packages/types"
|
|
5
25
|
}
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib';
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(t,e){return Object.keys(t).filter(r=>e.test(r))}function a(t){return t.toString().match(/\(([^)]*)\)/)?.[1]?.split(",").map(r=>r.trim())??[]}const n=t=>Object.keys(t).map(e=>t[e]);exports.filterKeys=s;exports.getConstructorParams=a;exports.getEnumValues=n;
|
package/index.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function s(t, r) {
|
|
2
|
-
return Object.keys(t).filter((e) => r.test(e));
|
|
3
|
-
}
|
|
4
|
-
function a(t) {
|
|
5
|
-
return t.toString().match(/\(([^)]*)\)/)?.[1]?.split(",").map((e) => e.trim()) ?? [];
|
|
6
|
-
}
|
|
7
|
-
const n = (t) => Object.keys(t).map((r) => t[r]);
|
|
8
|
-
export {
|
|
9
|
-
s as filterKeys,
|
|
10
|
-
a as getConstructorParams,
|
|
11
|
-
n as getEnumValues
|
|
12
|
-
};
|
package/lib/constructable.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Constructable<T> = new (...args: any[]) => T;
|
package/lib/deep-partial.d.ts
DELETED
package/lib/filtered-keys.d.ts
DELETED
package/lib/filtered-type.d.ts
DELETED
package/lib/get-enum-values.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get an array of enum values
|
|
3
|
-
*
|
|
4
|
-
* @param enumObject An enum object
|
|
5
|
-
* @example
|
|
6
|
-
* enum MyEnum {
|
|
7
|
-
* First = 'First',
|
|
8
|
-
* Second = 'Second',
|
|
9
|
-
* Third = 'Third',
|
|
10
|
-
* }
|
|
11
|
-
*
|
|
12
|
-
* const values = getEnumValues(MyEnum)
|
|
13
|
-
* // values = ['First', 'Second', 'Third']
|
|
14
|
-
* @returns An array of enum values
|
|
15
|
-
*/
|
|
16
|
-
export declare const getEnumValues: <E extends Record<string, any>>(enumObject: E) => E[keyof E][];
|
package/lib/index.d.ts
DELETED
package/lib/value-of.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ValueOf<T> = T[keyof T];
|