@xylabs/function-name 3.6.6 → 3.6.7
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/browser/index.cjs.map +1 -1
- package/dist/browser/index.d.cts +1 -1
- package/dist/browser/index.d.mts +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/{index.js → index.mjs} +1 -1
- package/dist/neutral/index.cjs.map +1 -1
- package/dist/neutral/index.d.cts +1 -1
- package/dist/neutral/index.d.mts +1 -1
- package/dist/neutral/index.d.ts +1 -1
- package/dist/neutral/{index.js → index.mjs} +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/{index.js → index.mjs} +1 -1
- package/package.json +10 -10
- package/src/index.ts +1 -1
- /package/dist/browser/{index.js.map → index.mjs.map} +0 -0
- /package/dist/neutral/{index.js.map → index.mjs.map} +0 -0
- /package/dist/node/{index.js.map → index.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.ts'\n","import { handleError } from '@xylabs/error'\n\nexport const functionName = (depth = 2) => {\n try {\n throw new Error('Getting function name')\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA4B;AAErB,IAAM,eAAe,CAAC,QAAQ,MAAM;AACzC,MAAI;AACF,UAAM,IAAI,MAAM,uBAAuB;AAAA,EACzC,SAAS,IAAI;AACX,eAAO,0BAAY,IAAI,CAAC,UAAU;AAChC,UAAI;AACJ,YAAM,aAAa,MAAM,OAAO,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG;AAC5D,YAAM,WACJ,YAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,CAAC,KAAK;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,aAAa,WAAW,CAAC,CAAC,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/browser/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.ts'\n","import { handleError } from '@xylabs/error'\n\nexport const functionName = (depth = 2) => {\n try {\n throw new Error('Getting function name')\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA4B;AAErB,IAAM,eAAe,CAAC,QAAQ,MAAM;AACzC,MAAI;AACF,UAAM,IAAI,MAAM,uBAAuB;AAAA,EACzC,SAAS,IAAI;AACX,eAAO,0BAAY,IAAI,CAAC,UAAU;AAChC,UAAI;AACJ,YAAM,aAAa,MAAM,OAAO,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG;AAC5D,YAAM,WACJ,YAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,CAAC,KAAK;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,aAAa,WAAW,CAAC,CAAC,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/neutral/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/functionName.ts"],"sourcesContent":["export * from './functionName.ts'\n","import { handleError } from '@xylabs/error'\n\nexport const functionName = (depth = 2) => {\n try {\n throw new Error('Getting function name')\n } catch (ex) {\n return handleError(ex, (error) => {\n let newIndex: number | undefined\n const stackParts = error.stack?.split('\\n')[depth].split(' ')\n const funcName =\n stackParts?.find((item, index) => {\n if (item.length > 0 && item !== 'at') {\n //check if constructor\n if (item === 'new') {\n newIndex = index\n }\n return item\n }\n }) ?? '<unknown>'\n return newIndex ? `${funcName} ${stackParts?.[newIndex + 1]}` : funcName\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA4B;AAErB,IAAM,eAAe,CAAC,QAAQ,MAAM;AACzC,MAAI;AACF,UAAM,IAAI,MAAM,uBAAuB;AAAA,EACzC,SAAS,IAAI;AACX,eAAO,0BAAY,IAAI,CAAC,UAAU;AANtC;AAOM,UAAI;AACJ,YAAM,cAAa,WAAM,UAAN,mBAAa,MAAM,MAAM,OAAO,MAAM;AACzD,YAAM,YACJ,yCAAY,KAAK,CAAC,MAAM,UAAU;AAChC,YAAI,KAAK,SAAS,KAAK,SAAS,MAAM;AAEpC,cAAI,SAAS,OAAO;AAClB,uBAAW;AAAA,UACb;AACA,iBAAO;AAAA,QACT;AAAA,MACF,OAAM;AACR,aAAO,WAAW,GAAG,QAAQ,IAAI,yCAAa,WAAW,EAAE,KAAK;AAAA,IAClE,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@xylabs/error": "^3.6.
|
|
14
|
+
"@xylabs/error": "^3.6.7"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
18
|
-
"@xylabs/tsconfig": "^3.
|
|
17
|
+
"@xylabs/ts-scripts-yarn3": "^3.15.4",
|
|
18
|
+
"@xylabs/tsconfig": "^3.15.4",
|
|
19
19
|
"typescript": "^5.5.4"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"default": "./dist/browser/index.cjs"
|
|
30
30
|
},
|
|
31
31
|
"import": {
|
|
32
|
-
"types": "./dist/browser/index.d.
|
|
33
|
-
"default": "./dist/browser/index.
|
|
32
|
+
"types": "./dist/browser/index.d.ts",
|
|
33
|
+
"default": "./dist/browser/index.mjs"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"node": {
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"default": "./dist/node/index.cjs"
|
|
40
40
|
},
|
|
41
41
|
"import": {
|
|
42
|
-
"types": "./dist/node/index.d.
|
|
43
|
-
"default": "./dist/node/index.
|
|
42
|
+
"types": "./dist/node/index.d.ts",
|
|
43
|
+
"default": "./dist/node/index.mjs"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"main": "dist/node/index.cjs",
|
|
50
|
-
"module": "dist/node/index.
|
|
51
|
-
"types": "dist/node/index.d.
|
|
50
|
+
"module": "dist/node/index.mjs",
|
|
51
|
+
"types": "dist/node/index.d.ts",
|
|
52
52
|
"homepage": "https://xyo.network",
|
|
53
53
|
"license": "LGPL-3.0-only",
|
|
54
54
|
"publishConfig": {
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"esm"
|
|
68
68
|
],
|
|
69
69
|
"sideEffects": false,
|
|
70
|
-
"version": "3.6.
|
|
70
|
+
"version": "3.6.7",
|
|
71
71
|
"type": "module"
|
|
72
72
|
}
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './functionName.
|
|
1
|
+
export * from './functionName.ts'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|