@pronto-tools-and-more/custom-js-functions 10.13.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/dist/main.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ (() => {
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (target, all) => {
5
+ for (var name in all)
6
+ __defProp(target, name, { get: all[name], enumerable: true });
7
+ };
8
+
9
+ // src/parts/Functions/Functions.ts
10
+ var Functions_exports = {};
11
+ __export(Functions_exports, {
12
+ id: () => id
13
+ });
14
+
15
+ // src/parts/FunctionId/FunctionId.ts
16
+ var id = (content, ...keys) => {
17
+ console.log({ content });
18
+ let current = content;
19
+ for (const key of keys) {
20
+ console.log({ current, key });
21
+ current = current?.[key];
22
+ }
23
+ return current;
24
+ };
25
+
26
+ // src/parts/Main/Main.ts
27
+ var main = () => {
28
+ const ref = window.$functions || {};
29
+ for (const [key, value] of Object.entries(Functions_exports)) {
30
+ console.log({ key, value });
31
+ ref[key] ||= value;
32
+ }
33
+ };
34
+
35
+ // src/main.ts
36
+ main();
37
+ })();
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@pronto-tools-and-more/custom-js-functions",
3
+ "version": "10.13.0",
4
+ "description": "",
5
+ "main": "dist/main.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "test": "node --unhandled-rejections=warn --experimental-vm-modules ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit",
9
+ "test:watch": "node --unhandled-rejections=warn --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
10
+ "type-check": "tsc",
11
+ "build": "esbuild src/main.ts --bundle --format=iife --outfile=dist/main.js",
12
+ "build:watch": "esbuild src/main.ts --bundle --format=iife --outfile=dist/main.js --watch"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "MIT",
17
+ "devDependencies": {
18
+ "@types/node": "^22.9.0",
19
+ "esbuild": "^0.24.0",
20
+ "ts-jest": "^29.2.5"
21
+ },
22
+ "engines": {
23
+ "node": ">=22"
24
+ }
25
+ }
package/src/main.ts ADDED
@@ -0,0 +1,3 @@
1
+ import * as Main from "./parts/Main/Main.js";
2
+
3
+ Main.main();
@@ -0,0 +1,9 @@
1
+ export const id = (content, ...keys) => {
2
+ console.log({ content });
3
+ let current = content;
4
+ for (const key of keys) {
5
+ console.log({ current, key });
6
+ current = current?.[key];
7
+ }
8
+ return current;
9
+ };
@@ -0,0 +1 @@
1
+ export * from "../FunctionId/FunctionId.js";
@@ -0,0 +1,10 @@
1
+ import * as Functions from "../Functions/Functions.js";
2
+
3
+ export const main = () => {
4
+ // @ts-ignore
5
+ const ref = window.$functions || {};
6
+ for (const [key, value] of Object.entries(Functions)) {
7
+ console.log({ key, value });
8
+ ref[key] ||= value;
9
+ }
10
+ };