jsir 2.6.7 → 2.6.8

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.
Files changed (2) hide show
  1. package/cmd/oaa.js +16 -1
  2. package/package.json +1 -1
package/cmd/oaa.js CHANGED
@@ -106,6 +106,9 @@ const $data = {
106
106
  return _dealOnLazyGet(key, onLazyTempCode)
107
107
  },
108
108
  gos: (key, defaultVal, onLazyTempCode) => {
109
+ `
110
+ get or set
111
+ `
109
112
  if (!vl(_data[key])) {
110
113
  if (defaultVal !== undefined) {
111
114
  return _dataSet(key, defaultVal, onLazyTempCode)
@@ -116,8 +119,20 @@ const $data = {
116
119
  return _dealOnLazyGet(key, onLazyTempCode)
117
120
  },
118
121
  gfs: (key, fn, onLazyTempCode) => {
122
+ `
123
+ get or set by function
124
+ `
119
125
  if (!vl(_data[key])) {
120
- return _dataSet(key, fn(), onLazyTempCode)
126
+ return _dataSet(key, fn(), onLazyTempCode)
127
+ }
128
+ return _dealOnLazyGet(key, onLazyTempCode)
129
+ },
130
+ gafs: async (key, fn, onLazyTempCode) => {
131
+ `
132
+ get or set by async function
133
+ `
134
+ if (!vl(_data[key])) {
135
+ return _dataSet(key, await fn(), onLazyTempCode)
121
136
  }
122
137
  return _dealOnLazyGet(key, onLazyTempCode)
123
138
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsir",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
4
4
  "description": "JavaScript Script Management Tool",
5
5
  "main": "index.js",
6
6
  "scripts": {