corebasic 1.0.186 → 1.0.188

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/dip.js CHANGED
@@ -12,6 +12,7 @@ export const batchBegin = Elabase.batchBegin
12
12
  export const batchAbort = Elabase.batchAbort
13
13
  export const batchSubmit = Elabase.batchSubmit
14
14
  export const batch = Elabase.batch
15
+ export const globalMeta = Elabase.globalMeta
15
16
 
16
17
  export const shard_stats = Elabase.shard_stats
17
18
  export let config = Elabase.config
package/libs/elabase.js CHANGED
@@ -54,6 +54,15 @@ export function start(dbName) {
54
54
  }
55
55
  }
56
56
 
57
+ export const globalMeta = args => {
58
+ let obj = { ...args, company: "GLOBAL", outlet: "GLOBAL" }
59
+ return {
60
+ ...obj,
61
+ setOutlet: outlet => {return {...obj, outlet}},
62
+ setCompany: company => {return {...obj, company}},
63
+ }
64
+ }
65
+
57
66
  function validate_collection(collection, fn_name) {
58
67
  if ((typeof collection === 'string' && collection.trim() === "") || (typeof collection !== 'string' && !Array.isArray(collection)) || (Array.isArray(collection) && (!collection.length || collection.some(item => typeof item !== "string" || item.trim() === "")))) {
59
68
  throw {message: `Error: Invalid collection ${fn_name}`}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.186",
4
+ "version": "1.0.188",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {