sculp-js 1.12.0 → 1.13.1
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/lib/cjs/array.js +1 -1
- package/lib/cjs/async.js +4 -4
- package/lib/cjs/base64.js +1 -1
- package/lib/cjs/clipboard.js +1 -1
- package/lib/cjs/cloneDeep.js +1 -1
- package/lib/cjs/cookie.js +1 -1
- package/lib/cjs/date.js +1 -1
- package/lib/cjs/dom.js +1 -1
- package/lib/cjs/download.js +1 -1
- package/lib/cjs/easing.js +1 -1
- package/lib/cjs/file.js +1 -1
- package/lib/cjs/func.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/isEqual.js +1 -1
- package/lib/cjs/math.js +1 -1
- package/lib/cjs/number.js +1 -1
- package/lib/cjs/object.js +1 -1
- package/lib/cjs/path.js +1 -1
- package/lib/cjs/qs.js +1 -1
- package/lib/cjs/random.js +1 -1
- package/lib/cjs/string.js +1 -1
- package/lib/cjs/tooltip.js +1 -1
- package/lib/cjs/tree.js +142 -59
- package/lib/cjs/type.js +1 -1
- package/lib/cjs/unique.js +1 -1
- package/lib/cjs/url.js +1 -1
- package/lib/cjs/validator.js +1 -1
- package/lib/cjs/variable.js +1 -1
- package/lib/cjs/watermark.js +1 -1
- package/lib/cjs/we-decode.js +1 -1
- package/lib/es/array.js +1 -1
- package/lib/es/async.js +4 -4
- package/lib/es/base64.js +1 -1
- package/lib/es/clipboard.js +1 -1
- package/lib/es/cloneDeep.js +1 -1
- package/lib/es/cookie.js +1 -1
- package/lib/es/date.js +1 -1
- package/lib/es/dom.js +1 -1
- package/lib/es/download.js +1 -1
- package/lib/es/easing.js +1 -1
- package/lib/es/file.js +1 -1
- package/lib/es/func.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/isEqual.js +1 -1
- package/lib/es/math.js +1 -1
- package/lib/es/number.js +1 -1
- package/lib/es/object.js +1 -1
- package/lib/es/path.js +1 -1
- package/lib/es/qs.js +1 -1
- package/lib/es/random.js +1 -1
- package/lib/es/string.js +1 -1
- package/lib/es/tooltip.js +1 -1
- package/lib/es/tree.js +143 -60
- package/lib/es/type.js +1 -1
- package/lib/es/unique.js +1 -1
- package/lib/es/url.js +1 -1
- package/lib/es/validator.js +1 -1
- package/lib/es/variable.js +1 -1
- package/lib/es/watermark.js +1 -1
- package/lib/es/we-decode.js +1 -1
- package/lib/index.d.ts +41 -24
- package/lib/umd/index.js +2 -2
- package/package.json +1 -1
package/lib/cjs/array.js
CHANGED
package/lib/cjs/async.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.
|
|
2
|
+
* sculp-js v1.13.1
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -62,16 +62,16 @@ function asyncMap(list, mapper, concurrency = Infinity) {
|
|
|
62
62
|
* Execute a promise safely
|
|
63
63
|
*
|
|
64
64
|
* @param { Promise } promise
|
|
65
|
-
* @param { Object= } errorExt - Additional Information you can pass
|
|
65
|
+
* @param { Object= } errorExt - Additional Information you can pass safeAwait the err object
|
|
66
66
|
* @return { Promise }
|
|
67
67
|
* @example
|
|
68
68
|
* async function asyncTaskWithCb(cb) {
|
|
69
69
|
let err, user, savedTask, notification;
|
|
70
70
|
|
|
71
|
-
[ err, user ] = await
|
|
71
|
+
[ err, user ] = await safeAwait(UserModel.findById(1));
|
|
72
72
|
if(!user) return cb('No user found');
|
|
73
73
|
|
|
74
|
-
[ err, savedTask ] = await
|
|
74
|
+
[ err, savedTask ] = await safeAwait(TaskModel({userId: user.id, name: 'Demo Task'}));
|
|
75
75
|
if(err) return cb('Error occurred while saving task')
|
|
76
76
|
|
|
77
77
|
cb(null, savedTask);
|
package/lib/cjs/base64.js
CHANGED
package/lib/cjs/clipboard.js
CHANGED
package/lib/cjs/cloneDeep.js
CHANGED
package/lib/cjs/cookie.js
CHANGED
package/lib/cjs/date.js
CHANGED
package/lib/cjs/dom.js
CHANGED
package/lib/cjs/download.js
CHANGED
package/lib/cjs/easing.js
CHANGED
package/lib/cjs/file.js
CHANGED
package/lib/cjs/func.js
CHANGED
package/lib/cjs/index.js
CHANGED
package/lib/cjs/isEqual.js
CHANGED
package/lib/cjs/math.js
CHANGED
package/lib/cjs/number.js
CHANGED
package/lib/cjs/object.js
CHANGED
package/lib/cjs/path.js
CHANGED
package/lib/cjs/qs.js
CHANGED
package/lib/cjs/random.js
CHANGED
package/lib/cjs/string.js
CHANGED
package/lib/cjs/tooltip.js
CHANGED
package/lib/cjs/tree.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.
|
|
2
|
+
* sculp-js v1.13.1
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -17,58 +17,126 @@ const defaultSearchTreeOptions = {
|
|
|
17
17
|
ignoreCase: true
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 树遍历函数(支持continue和break操作), 可用于insert tree item 和 remove tree item
|
|
21
21
|
* @param {ArrayLike<V>} tree 树形数据
|
|
22
22
|
* @param {Function} iterator 迭代函数, 返回值为true时continue, 返回值为false时break
|
|
23
|
-
* @param {
|
|
24
|
-
|
|
23
|
+
* @param {options} options 支持定制子元素名称、反向遍历、广度优先遍历,默认{
|
|
24
|
+
childField: 'children',
|
|
25
|
+
reverse: false,
|
|
26
|
+
breadthFirst: false
|
|
27
|
+
}
|
|
25
28
|
* @returns {*}
|
|
26
29
|
*/
|
|
27
|
-
function forEachDeep(tree, iterator,
|
|
30
|
+
function forEachDeep(tree, iterator, options = {
|
|
31
|
+
childField: 'children',
|
|
32
|
+
reverse: false,
|
|
33
|
+
breadthFirst: false
|
|
34
|
+
}) {
|
|
35
|
+
const { childField = 'children', reverse = false, breadthFirst = false } = type.isObject(options) ? options : {};
|
|
28
36
|
let isBreak = false;
|
|
37
|
+
const queue = [];
|
|
29
38
|
const walk = (arr, parent, level = 0) => {
|
|
30
|
-
if (
|
|
31
|
-
for (let
|
|
39
|
+
if (reverse) {
|
|
40
|
+
for (let index = arr.length - 1; index >= 0; index--) {
|
|
32
41
|
if (isBreak) {
|
|
33
42
|
break;
|
|
34
43
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
const item = arr[index];
|
|
45
|
+
// 广度优先
|
|
46
|
+
if (breadthFirst) {
|
|
47
|
+
queue.push({ item, index, array: arr, tree, parent, level });
|
|
39
48
|
}
|
|
40
|
-
else
|
|
41
|
-
|
|
49
|
+
else {
|
|
50
|
+
const re = iterator(item, index, arr, tree, parent, level);
|
|
51
|
+
if (re === false) {
|
|
52
|
+
isBreak = true;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
else if (re === true) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
if (item && Array.isArray(item[childField])) {
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
walk(item[childField], item, level + 1);
|
|
62
|
+
}
|
|
42
63
|
}
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
}
|
|
65
|
+
if (breadthFirst) {
|
|
66
|
+
// Process queue
|
|
67
|
+
while (queue.length > 0 && !isBreak) {
|
|
68
|
+
const current = queue.shift();
|
|
69
|
+
// iterate(info);
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
const { item, index, array, tree, parent, level } = current;
|
|
72
|
+
const re = iterator(item, index, array, tree, parent, level);
|
|
73
|
+
if (re === false) {
|
|
74
|
+
isBreak = true;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
else if (re === true) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
45
80
|
// @ts-ignore
|
|
46
|
-
|
|
81
|
+
if (item && Array.isArray(item[childField])) {
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
walk(item[childField], item, level + 1);
|
|
84
|
+
}
|
|
47
85
|
}
|
|
48
86
|
}
|
|
49
87
|
}
|
|
50
88
|
else {
|
|
51
|
-
for (let
|
|
89
|
+
for (let index = 0, len = arr.length; index < len; index++) {
|
|
52
90
|
if (isBreak) {
|
|
53
91
|
break;
|
|
54
92
|
}
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
93
|
+
const item = arr[index];
|
|
94
|
+
if (breadthFirst) {
|
|
95
|
+
// 广度优先
|
|
96
|
+
queue.push({ item, index: index, array: arr, tree, parent, level });
|
|
59
97
|
}
|
|
60
|
-
else
|
|
61
|
-
|
|
98
|
+
else {
|
|
99
|
+
// 深度优先
|
|
100
|
+
const re = iterator(item, index, arr, tree, parent, level);
|
|
101
|
+
if (re === false) {
|
|
102
|
+
isBreak = true;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
else if (re === true) {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
// @ts-ignore
|
|
109
|
+
if (item && Array.isArray(item[childField])) {
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
walk(item[childField], item, level + 1);
|
|
112
|
+
}
|
|
62
113
|
}
|
|
63
|
-
|
|
64
|
-
|
|
114
|
+
}
|
|
115
|
+
if (breadthFirst) {
|
|
116
|
+
while (queue.length > 0 && !isBreak) {
|
|
117
|
+
const current = queue.shift();
|
|
118
|
+
if (!current)
|
|
119
|
+
break;
|
|
120
|
+
// @ts-ignore
|
|
121
|
+
const { item, index, array, tree, parent, level } = current;
|
|
122
|
+
const re = iterator(item, index, array, tree, parent, level);
|
|
123
|
+
if (re === false) {
|
|
124
|
+
isBreak = true;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
else if (re === true) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
65
130
|
// @ts-ignore
|
|
66
|
-
|
|
131
|
+
if (item && Array.isArray(item[childField])) {
|
|
132
|
+
// @ts-ignore
|
|
133
|
+
walk(item[childField], item, level + 1);
|
|
134
|
+
}
|
|
67
135
|
}
|
|
68
136
|
}
|
|
69
137
|
}
|
|
70
138
|
};
|
|
71
|
-
walk(tree, null);
|
|
139
|
+
walk(tree, null, 0);
|
|
72
140
|
// @ts-ignore
|
|
73
141
|
tree = null;
|
|
74
142
|
}
|
|
@@ -78,20 +146,27 @@ function forEachDeep(tree, iterator, children = 'children', isReverse = false) {
|
|
|
78
146
|
* 可遍历任何带有 length 属性和数字键的类数组对象
|
|
79
147
|
* @param {ArrayLike<V>} tree 树形数据
|
|
80
148
|
* @param {Function} iterator 迭代函数, 返回值为true时continue, 返回值为false时break
|
|
81
|
-
* @param {
|
|
82
|
-
|
|
149
|
+
* @param {options} options 支持定制子元素名称、反向遍历,默认{
|
|
150
|
+
childField: 'children',
|
|
151
|
+
reverse: false,
|
|
152
|
+
}
|
|
83
153
|
* @returns {any[]} 新的一棵树
|
|
84
154
|
*/
|
|
85
|
-
function mapDeep(tree, iterator,
|
|
155
|
+
function mapDeep(tree, iterator, options = {
|
|
156
|
+
childField: 'children',
|
|
157
|
+
reverse: false
|
|
158
|
+
}) {
|
|
159
|
+
const { childField = 'children', reverse = false } = type.isObject(options) ? options : {};
|
|
86
160
|
let isBreak = false;
|
|
87
161
|
const newTree = [];
|
|
88
162
|
const walk = (arr, parent, newTree, level = 0) => {
|
|
89
|
-
if (
|
|
163
|
+
if (reverse) {
|
|
90
164
|
for (let i = arr.length - 1; i >= 0; i--) {
|
|
91
165
|
if (isBreak) {
|
|
92
166
|
break;
|
|
93
167
|
}
|
|
94
|
-
const
|
|
168
|
+
const item = arr[i];
|
|
169
|
+
const re = iterator(item, i, arr, tree, parent, level);
|
|
95
170
|
if (re === false) {
|
|
96
171
|
isBreak = true;
|
|
97
172
|
break;
|
|
@@ -99,16 +174,16 @@ function mapDeep(tree, iterator, children = 'children', isReverse = false) {
|
|
|
99
174
|
else if (re === true) {
|
|
100
175
|
continue;
|
|
101
176
|
}
|
|
102
|
-
newTree.push(object.objectOmit(re, [
|
|
177
|
+
newTree.push(object.objectOmit(re, [childField]));
|
|
103
178
|
// @ts-ignore
|
|
104
|
-
if (
|
|
105
|
-
newTree[newTree.length - 1][
|
|
179
|
+
if (item && Array.isArray(item[childField])) {
|
|
180
|
+
newTree[newTree.length - 1][childField] = [];
|
|
106
181
|
// @ts-ignore
|
|
107
|
-
walk(
|
|
182
|
+
walk(item[childField], item, newTree[newTree.length - 1][childField], level + 1);
|
|
108
183
|
}
|
|
109
184
|
else {
|
|
110
185
|
// children非有效数组时,移除该属性字段
|
|
111
|
-
delete re[
|
|
186
|
+
delete re[childField];
|
|
112
187
|
}
|
|
113
188
|
}
|
|
114
189
|
}
|
|
@@ -117,7 +192,8 @@ function mapDeep(tree, iterator, children = 'children', isReverse = false) {
|
|
|
117
192
|
if (isBreak) {
|
|
118
193
|
break;
|
|
119
194
|
}
|
|
120
|
-
const
|
|
195
|
+
const item = arr[i];
|
|
196
|
+
const re = iterator(item, i, arr, tree, parent, level);
|
|
121
197
|
if (re === false) {
|
|
122
198
|
isBreak = true;
|
|
123
199
|
break;
|
|
@@ -125,16 +201,16 @@ function mapDeep(tree, iterator, children = 'children', isReverse = false) {
|
|
|
125
201
|
else if (re === true) {
|
|
126
202
|
continue;
|
|
127
203
|
}
|
|
128
|
-
newTree.push(object.objectOmit(re, [
|
|
204
|
+
newTree.push(object.objectOmit(re, [childField]));
|
|
129
205
|
// @ts-ignore
|
|
130
|
-
if (
|
|
131
|
-
newTree[newTree.length - 1][
|
|
206
|
+
if (item && Array.isArray(item[childField])) {
|
|
207
|
+
newTree[newTree.length - 1][childField] = [];
|
|
132
208
|
// @ts-ignore
|
|
133
|
-
walk(
|
|
209
|
+
walk(item[childField], item, newTree[newTree.length - 1][childField], level + 1);
|
|
134
210
|
}
|
|
135
211
|
else {
|
|
136
212
|
// children非有效数组时,移除该属性字段
|
|
137
|
-
delete re[
|
|
213
|
+
delete re[childField];
|
|
138
214
|
}
|
|
139
215
|
}
|
|
140
216
|
}
|
|
@@ -148,30 +224,30 @@ function mapDeep(tree, iterator, children = 'children', isReverse = false) {
|
|
|
148
224
|
* 在树中找到 id 为某个值的节点,并返回上游的所有父级节点
|
|
149
225
|
*
|
|
150
226
|
* @param {ArrayLike<T>} tree - 树形数据
|
|
151
|
-
* @param {
|
|
152
|
-
* @param {ITreeConf}
|
|
153
|
-
* @returns {[
|
|
227
|
+
* @param {number | string} nodeId - 目标元素ID
|
|
228
|
+
* @param {ITreeConf} options - 迭代配置项, 默认:{ children = 'children', id = 'id' }
|
|
229
|
+
* @returns {[(number | string)[], V[]]} - 由parentId...childId, parentObject-childObject组成的二维数组
|
|
154
230
|
*/
|
|
155
|
-
function searchTreeById(tree, nodeId,
|
|
156
|
-
const {
|
|
231
|
+
function searchTreeById(tree, nodeId, options = { childField: 'children', keyField: 'id' }) {
|
|
232
|
+
const { childField = 'children', keyField = 'id' } = type.isObject(options) ? options : {};
|
|
157
233
|
const toFlatArray = (tree, parentId, parent) => {
|
|
158
234
|
return tree.reduce((t, _) => {
|
|
159
|
-
const child = _[
|
|
235
|
+
const child = _[childField];
|
|
160
236
|
return [
|
|
161
237
|
...t,
|
|
162
238
|
parentId ? { ..._, parentId, parent } : _,
|
|
163
|
-
...(child && child.length ? toFlatArray(child, _[
|
|
239
|
+
...(child && child.length ? toFlatArray(child, _[keyField], _) : [])
|
|
164
240
|
];
|
|
165
241
|
}, []);
|
|
166
242
|
};
|
|
167
243
|
const getIds = (flatArray) => {
|
|
168
|
-
let child = flatArray.find(_ => _[
|
|
244
|
+
let child = flatArray.find(_ => _[keyField] === nodeId);
|
|
169
245
|
const { parent, parentId, ...other } = child;
|
|
170
246
|
let ids = [nodeId], nodes = [other];
|
|
171
247
|
while (child && child.parentId) {
|
|
172
248
|
ids = [child.parentId, ...ids];
|
|
173
249
|
nodes = [child.parent, ...nodes];
|
|
174
|
-
child = flatArray.find(_ => _[
|
|
250
|
+
child = flatArray.find(_ => _[keyField] === child.parentId); // eslint-disable-line
|
|
175
251
|
}
|
|
176
252
|
return [ids, nodes];
|
|
177
253
|
};
|
|
@@ -180,11 +256,12 @@ function searchTreeById(tree, nodeId, config) {
|
|
|
180
256
|
/**
|
|
181
257
|
* 扁平化数组转换成树
|
|
182
258
|
* @param {any[]} list
|
|
183
|
-
* @param {IFieldOptions} options
|
|
259
|
+
* @param {IFieldOptions} options 定制id字段名,子元素字段名,父元素字段名,默认
|
|
260
|
+
* { keyField: 'key', childField: 'children', pidField: 'pid' }
|
|
184
261
|
* @returns {any[]}
|
|
185
262
|
*/
|
|
186
263
|
function formatTree(list, options = defaultFieldOptions) {
|
|
187
|
-
const { keyField, childField, pidField } = options;
|
|
264
|
+
const { keyField = 'key', childField = 'children', pidField = 'pid' } = type.isObject(options) ? options : {};
|
|
188
265
|
const treeArr = [];
|
|
189
266
|
const sourceMap = {};
|
|
190
267
|
for (let i = 0, len = list.length; i < len; i++) {
|
|
@@ -207,12 +284,13 @@ function formatTree(list, options = defaultFieldOptions) {
|
|
|
207
284
|
}
|
|
208
285
|
/**
|
|
209
286
|
* 树形结构转扁平化
|
|
210
|
-
* @param {any} treeList
|
|
211
|
-
* @param {IFieldOptions} options
|
|
212
|
-
*
|
|
287
|
+
* @param {any[]} treeList
|
|
288
|
+
* @param {IFieldOptions} options 定制id字段名,子元素字段名,父元素字段名,默认
|
|
289
|
+
* { keyField: 'key', childField: 'children', pidField: 'pid' }
|
|
290
|
+
* @returns {any[]}
|
|
213
291
|
*/
|
|
214
292
|
function flatTree(treeList, options = defaultFieldOptions) {
|
|
215
|
-
const {
|
|
293
|
+
const { keyField = 'key', childField = 'children', pidField = 'pid' } = type.isObject(options) ? options : {};
|
|
216
294
|
let res = [];
|
|
217
295
|
for (let i = 0, len = treeList.length; i < len; i++) {
|
|
218
296
|
const node = treeList[i];
|
|
@@ -243,7 +321,12 @@ function flatTree(treeList, options = defaultFieldOptions) {
|
|
|
243
321
|
* 2. 若无任何过滤条件或keyword模式匹配且keyword为空串,返回原对象;其他情况返回新数组
|
|
244
322
|
* @param {V[]} nodes
|
|
245
323
|
* @param {IFilterCondition} filterCondition
|
|
246
|
-
* @param {ISearchTreeOpts} options
|
|
324
|
+
* @param {ISearchTreeOpts} options 默认配置项 {
|
|
325
|
+
childField: 'children',
|
|
326
|
+
nameField: 'name',
|
|
327
|
+
removeEmptyChild: false,
|
|
328
|
+
ignoreCase: true
|
|
329
|
+
}
|
|
247
330
|
* @returns {V[]}
|
|
248
331
|
*/
|
|
249
332
|
function fuzzySearchTree(nodes, filterCondition, options = defaultSearchTreeOptions) {
|
package/lib/cjs/type.js
CHANGED
package/lib/cjs/unique.js
CHANGED
package/lib/cjs/url.js
CHANGED
package/lib/cjs/validator.js
CHANGED
package/lib/cjs/variable.js
CHANGED
package/lib/cjs/watermark.js
CHANGED
package/lib/cjs/we-decode.js
CHANGED
package/lib/es/array.js
CHANGED
package/lib/es/async.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.
|
|
2
|
+
* sculp-js v1.13.1
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -60,16 +60,16 @@ function asyncMap(list, mapper, concurrency = Infinity) {
|
|
|
60
60
|
* Execute a promise safely
|
|
61
61
|
*
|
|
62
62
|
* @param { Promise } promise
|
|
63
|
-
* @param { Object= } errorExt - Additional Information you can pass
|
|
63
|
+
* @param { Object= } errorExt - Additional Information you can pass safeAwait the err object
|
|
64
64
|
* @return { Promise }
|
|
65
65
|
* @example
|
|
66
66
|
* async function asyncTaskWithCb(cb) {
|
|
67
67
|
let err, user, savedTask, notification;
|
|
68
68
|
|
|
69
|
-
[ err, user ] = await
|
|
69
|
+
[ err, user ] = await safeAwait(UserModel.findById(1));
|
|
70
70
|
if(!user) return cb('No user found');
|
|
71
71
|
|
|
72
|
-
[ err, savedTask ] = await
|
|
72
|
+
[ err, savedTask ] = await safeAwait(TaskModel({userId: user.id, name: 'Demo Task'}));
|
|
73
73
|
if(err) return cb('Error occurred while saving task')
|
|
74
74
|
|
|
75
75
|
cb(null, savedTask);
|
package/lib/es/base64.js
CHANGED
package/lib/es/clipboard.js
CHANGED
package/lib/es/cloneDeep.js
CHANGED
package/lib/es/cookie.js
CHANGED