queueobj 9.1.0 → 10.0.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/app.js +35 -31
- package/package.json +1 -1
- package/test/package.js +4 -3
package/app.js
CHANGED
|
@@ -113,37 +113,41 @@ class QueueObj {
|
|
|
113
113
|
var t = this
|
|
114
114
|
t.props = props
|
|
115
115
|
t.stats = (typeof props.stats != 'undefined') ? props.stats : false;
|
|
116
|
-
if (typeof props != `undefined`
|
|
117
|
-
typeof props.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
116
|
+
if (typeof props != `undefined`) {
|
|
117
|
+
if (typeof props.log != `undefined`) {
|
|
118
|
+
console.log = props.log
|
|
119
|
+
}
|
|
120
|
+
if (typeof props.appender != `undefined` &&
|
|
121
|
+
typeof props.appender == 'string') {
|
|
122
|
+
props.getParent = t.getParent
|
|
123
|
+
switch (props.appender) {
|
|
124
|
+
case 'all':
|
|
125
|
+
t.all = new all(props)
|
|
126
|
+
break
|
|
127
|
+
case 'top_one':
|
|
128
|
+
t.top_one = new top_one(props)
|
|
129
|
+
break
|
|
130
|
+
case 'bottom_one':
|
|
131
|
+
t.bottom_one = new bottom_one(props)
|
|
132
|
+
break
|
|
133
|
+
case 'func_all':
|
|
134
|
+
t.func_all = new func_all(props)
|
|
135
|
+
break
|
|
136
|
+
case 'array':
|
|
137
|
+
t.array = new array(props)
|
|
138
|
+
break
|
|
139
|
+
case 'status':
|
|
140
|
+
t.status = new status(props)
|
|
141
|
+
break
|
|
142
|
+
case 'version':
|
|
143
|
+
t.version = new version(props)
|
|
144
|
+
break
|
|
145
|
+
case 'sync_all':
|
|
146
|
+
t.sync_all = new sync_all(props)
|
|
147
|
+
break
|
|
148
|
+
default:
|
|
149
|
+
throw new Error(`appender(${props.appender}) not found`)
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
return t
|
|
149
153
|
}
|
package/package.json
CHANGED
package/test/package.js
CHANGED
|
@@ -6,7 +6,7 @@ const packageMock = {
|
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jim Manton"
|
|
8
8
|
},
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "10.0.0",
|
|
10
10
|
"bundleDependencies": false,
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chai": "^4.3.3",
|
|
@@ -45,11 +45,12 @@ const packageMock = {
|
|
|
45
45
|
|
|
46
46
|
describe('package.json', function () {
|
|
47
47
|
it('should pass', function () {
|
|
48
|
-
|
|
48
|
+
const difference = jsonHasDifferences(packagejson, packageMock)
|
|
49
|
+
assert(JSON.stringify(difference) == "{}")
|
|
49
50
|
})
|
|
50
51
|
|
|
51
52
|
it('should fail', function () {
|
|
52
53
|
packageMock.version = '0'
|
|
53
|
-
assert(jsonHasDifferences(packagejson, packageMock
|
|
54
|
+
assert(jsonHasDifferences(packagejson, packageMock))
|
|
54
55
|
})
|
|
55
56
|
})
|