corebasic 1.0.37 → 1.0.39

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/libs/features.js CHANGED
@@ -21,7 +21,7 @@ export function start(app, url) {
21
21
  let handler = name.pop()
22
22
  name = `src/${name.join('/')}`
23
23
 
24
- if (name === 'transactions/query')
24
+ if (name === 'src/transactions/query')
25
25
  return
26
26
 
27
27
  feature.handler = (await import(`${new URL(`${name}.js`, url).toString().replace('file://', '')}`))[handler]
package/libs/utils.js CHANGED
@@ -138,6 +138,15 @@ export function sum(array) { // Eg: sum([10,20,undefined, NaN, 40])
138
138
  }
139
139
 
140
140
 
141
+ // ----------------
142
+ // JSON
143
+ // ----------------
144
+ export async function fileToJson(url) {
145
+ let {createRequire} = await import('module')
146
+ const require = createRequire(import.meta.url);
147
+ return require(url);
148
+ }
149
+
141
150
  // ----------------
142
151
  // Pipeline Execute
143
152
  // ----------------
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.37",
4
+ "version": "1.0.39",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {