msgpackr 1.5.5 → 1.5.6
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/dist/index.min.js +1 -1
- package/dist/node.cjs +1 -2
- package/dist/str.cjs +100 -0
- package/dist/test.js +3 -580
- package/node-index.js +1 -2
- package/package.json +2 -2
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.msgpackr={}))})(this,function(e){
|
|
1
|
+
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e=e||self,t(e.msgpackr={}))})(this,function(e){"use strict";var t=Math.floor;function n(){try{if(!D.trusted&&!Y){let e=M.sharedLength||0;e<M.length&&(M.length=e)}let e=r();if(B&&(// bundled strings to skip past
|
|
2
2
|
P=B.postBundlePosition),P==E)M.restoreStructures&&s(),M=null,R=null,C&&(C=null);else if(P>E){// over read
|
|
3
3
|
let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}else if(!Y)throw new Error("Data read, but end of buffer not reached");// else more to read, but we are reading sequentially, so don't clear source yet
|
|
4
4
|
return e}catch(e){throw M.restoreStructures&&s(),m(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function s(){for(let e in M.restoreStructures)M[e]=M.restoreStructures[e];M.restoreStructures=null}function r(){let e=R[P++];if(160>e){if(!(128>e)){if(!(144>e)){e-=144;let t=Array(e);for(let n=0;n<e;n++)t[n]=r();return t}if(e-=128,D.mapsAsObjects){let t={};for(let n=0;n<e;n++)t[h()]=r();return t}else{let t=new Map;for(let n=0;n<e;n++)t.set(r(),r());return t}}else if(64>e)return e;else{let t=M[63&e]||D.getStructures&&o()[63&e];return t?(t.read||(t.read=i(t,63&e)),t.read()):e}}else if(192>e){// fixstr
|
package/dist/node.cjs
CHANGED
|
@@ -2124,8 +2124,7 @@ function tryRequire(moduleId) {
|
|
|
2124
2124
|
let require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node.cjs', document.baseURI).href)));
|
|
2125
2125
|
return require$1(moduleId)
|
|
2126
2126
|
} catch (error) {
|
|
2127
|
-
|
|
2128
|
-
console.warn('For browser usage, directly use msgpackr/unpack or msgpackr/pack modules. ' + error.message.split('\n')[0]);
|
|
2127
|
+
// native module is optional
|
|
2129
2128
|
}
|
|
2130
2129
|
}
|
|
2131
2130
|
|
package/dist/str.cjs
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
let utfz = require('../../msgpack-benchmark/node_modules/utfz-lib')
|
|
2
|
+
|
|
3
|
+
var safeEnd = 1000000;
|
|
4
|
+
var b = new Uint8Array(32768)
|
|
5
|
+
function writeString(value, target, position) {
|
|
6
|
+
var length, strLength = value.length;
|
|
7
|
+
let headerSize;
|
|
8
|
+
// first we estimate the header size, so we can write to the correct location
|
|
9
|
+
if (strLength < 0x20) {
|
|
10
|
+
headerSize = 1;
|
|
11
|
+
} else if (strLength < 0x100) {
|
|
12
|
+
headerSize = 2;
|
|
13
|
+
} else if (strLength < 0x10000) {
|
|
14
|
+
headerSize = 3;
|
|
15
|
+
} else {
|
|
16
|
+
headerSize = 5;
|
|
17
|
+
}
|
|
18
|
+
let maxBytes = strLength * 3;
|
|
19
|
+
//if (position + maxBytes > safeEnd)
|
|
20
|
+
// target = makeRoom(position + maxBytes);
|
|
21
|
+
for (let i = 0; i < 100; i++) {
|
|
22
|
+
length = pack(value, strLength, target, position + headerSize);
|
|
23
|
+
}
|
|
24
|
+
if (strLength < 0x40 || !encodeUtf8) {
|
|
25
|
+
var strPosition = position + headerSize;
|
|
26
|
+
var c2 = 0;
|
|
27
|
+
for (let i = 0; i < strLength; i++) {
|
|
28
|
+
const c1 = value.charCodeAt(i);
|
|
29
|
+
if (c1 < 0x80) {
|
|
30
|
+
target[strPosition++] = c1;
|
|
31
|
+
} else if (c1 < 0x800) {
|
|
32
|
+
target[strPosition++] = c1 >> 6 | 0xc0;
|
|
33
|
+
target[strPosition++] = c1 & 0x3f | 0x80;
|
|
34
|
+
} else if (
|
|
35
|
+
(c1 & 0xfc00) === 0xd800 &&
|
|
36
|
+
((c2 = value.charCodeAt(i + 1)) & 0xfc00) === 0xdc00
|
|
37
|
+
) {
|
|
38
|
+
c1 = 0x10000 + ((c1 & 0x03ff) << 10) + (c2 & 0x03ff);
|
|
39
|
+
i++;
|
|
40
|
+
target[strPosition++] = c1 >> 18 | 0xf0;
|
|
41
|
+
target[strPosition++] = c1 >> 12 & 0x3f | 0x80;
|
|
42
|
+
target[strPosition++] = c1 >> 6 & 0x3f | 0x80;
|
|
43
|
+
target[strPosition++] = c1 & 0x3f | 0x80;
|
|
44
|
+
} else {
|
|
45
|
+
target[strPosition++] = c1 >> 12 | 0xe0;
|
|
46
|
+
target[strPosition++] = c1 >> 6 & 0x3f | 0x80;
|
|
47
|
+
target[strPosition++] = c1 & 0x3f | 0x80;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
length = strPosition - position - headerSize;
|
|
51
|
+
} else {
|
|
52
|
+
length = encodeUtf8(value, position + headerSize, maxBytes);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if (length < 0x20) {
|
|
57
|
+
target[position++] = 0xa0 | length;
|
|
58
|
+
} else if (length < 0x100) {
|
|
59
|
+
if (headerSize < 2) {
|
|
60
|
+
target.copyWithin(position + 2, position + 1, position + 1 + length);
|
|
61
|
+
}
|
|
62
|
+
target[position++] = 0xd9;
|
|
63
|
+
target[position++] = length;
|
|
64
|
+
} else if (length < 0x10000) {
|
|
65
|
+
if (headerSize < 3) {
|
|
66
|
+
target.copyWithin(position + 3, position + 2, position + 2 + length);
|
|
67
|
+
}
|
|
68
|
+
target[position++] = 0xda;
|
|
69
|
+
target[position++] = length >> 8;
|
|
70
|
+
target[position++] = length & 0xff;
|
|
71
|
+
} else {
|
|
72
|
+
if (headerSize < 5) {
|
|
73
|
+
target.copyWithin(position + 5, position + 3, position + 3 + length);
|
|
74
|
+
}
|
|
75
|
+
target[position++] = 0xdb;
|
|
76
|
+
targetView.setUint32(position, length);
|
|
77
|
+
position += 4;
|
|
78
|
+
}
|
|
79
|
+
return position + length
|
|
80
|
+
};
|
|
81
|
+
const pack = (str, length, buf, offset) => {
|
|
82
|
+
const start = offset;
|
|
83
|
+
let currHigh = 0;
|
|
84
|
+
for (let i = 0; i < length; i++) {
|
|
85
|
+
const code = str.charCodeAt(i);
|
|
86
|
+
const high = code >> 8;
|
|
87
|
+
if (high !== currHigh) {
|
|
88
|
+
buf[i + offset++] = 0;
|
|
89
|
+
buf[i + offset++] = high;
|
|
90
|
+
currHigh = high;
|
|
91
|
+
}
|
|
92
|
+
const low = code & 0xff;
|
|
93
|
+
buf[i + offset] = low;
|
|
94
|
+
if (!low) {
|
|
95
|
+
buf[i + ++offset] = currHigh;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return length + offset - start;
|
|
99
|
+
};
|
|
100
|
+
module.exports = writeString;
|
package/dist/test.js
CHANGED
|
@@ -1,586 +1,9 @@
|
|
|
1
|
-
(function (msgpackr, chai) {
|
|
1
|
+
(function (msgpackr, chai, fs) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
chai = chai && Object.prototype.hasOwnProperty.call(chai, 'default') ? chai['default'] : chai;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
Designs: [
|
|
8
|
-
"Randomized Controlled Trial"
|
|
9
|
-
],
|
|
10
|
-
Types: [
|
|
11
|
-
],
|
|
12
|
-
BriefSummary: "To determine the efficacy, long-term safety, and tolerability of alirocumab 300 mg every 4\n weeks (Q4W), in comparison with placebo, as well as its potential as a starting regimen. The\n dose regimen of 75 mg every 2 weeks (Q2W), as used in other studies, was added as a\n calibrator.",
|
|
13
|
-
Abstract: "To determine the efficacy, long-term safety, and tolerability of alirocumab 300 mg every 4\n weeks (Q4W), in comparison with placebo, as well as its potential as a starting regimen. The\n dose regimen of 75 mg every 2 weeks (Q2W), as used in other studies, was added as a\n calibrator.",
|
|
14
|
-
Acronym: null,
|
|
15
|
-
ArticleId: "Qy3gwKWSoaWRmbmFEQA",
|
|
16
|
-
Authors: null,
|
|
17
|
-
CochraneID: null,
|
|
18
|
-
Confidential: false,
|
|
19
|
-
CorporateAuthor: null,
|
|
20
|
-
Country: "Bulgaria, Canada, Hungary, Israel, Norway, Slovakia, United Kingdom, United States",
|
|
21
|
-
CustomData: null,
|
|
22
|
-
DatabaseType: "ClinicalTrials.gov",
|
|
23
|
-
DOI: null,
|
|
24
|
-
EmbaseAccessionNumber: null,
|
|
25
|
-
Emtree: null,
|
|
26
|
-
ErrataText: null,
|
|
27
|
-
FullTextURL: null,
|
|
28
|
-
Institution: null,
|
|
29
|
-
ISSN: null,
|
|
30
|
-
Issue: null,
|
|
31
|
-
JournalTitle: null,
|
|
32
|
-
MedlineID: null,
|
|
33
|
-
MeSH: "Hypercholesterolemia|Antibodies, Monoclonal",
|
|
34
|
-
Pages: null,
|
|
35
|
-
ParentChildStatus: null,
|
|
36
|
-
ParentID: null,
|
|
37
|
-
PublicationDate: "March 21, 2017",
|
|
38
|
-
PublicationYear: 2017,
|
|
39
|
-
PubType: null,
|
|
40
|
-
ReferenceStudy: null,
|
|
41
|
-
SecondarySourceID: null,
|
|
42
|
-
Source: "Regeneron Pharmaceuticals",
|
|
43
|
-
SourceReferenceId: "NCT01926782",
|
|
44
|
-
TaStudyDesign: "Randomized",
|
|
45
|
-
Title: "A Randomized, Double-Blind, Placebo-Controlled Study to Evaluate the Efficacy and Safety of an Every Four Weeks Treatment Regimen of Alirocumab in Patients With Primary Hypercholesterolemia",
|
|
46
|
-
TrialOutcome: null,
|
|
47
|
-
Volume: null,
|
|
48
|
-
Id: 179246831,
|
|
49
|
-
Created: "2020-04-10T14:48:20.4384957Z",
|
|
50
|
-
VersionNo: 2,
|
|
51
|
-
ExtractData: null,
|
|
52
|
-
Digitized: true,
|
|
53
|
-
IsRapidExtract: false,
|
|
54
|
-
IsUploaded: false
|
|
55
|
-
};
|
|
56
|
-
var design = "Randomized Controlled Trial";
|
|
57
|
-
var conditions = [
|
|
58
|
-
{
|
|
59
|
-
label: "Cholesterol Total Increased",
|
|
60
|
-
id: "SUE_c"
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
var phase = 3;
|
|
64
|
-
var name = "NCT01926782";
|
|
65
|
-
var trialIds = [
|
|
66
|
-
"NCT01926782"
|
|
67
|
-
];
|
|
68
|
-
var acronyms = [
|
|
69
|
-
];
|
|
70
|
-
var outcomeCount = 156;
|
|
71
|
-
var id = 179246831;
|
|
72
|
-
var groups = [
|
|
73
|
-
{
|
|
74
|
-
Id: "4r",
|
|
75
|
-
RefId: "B5|O2~Alirocumab 75 mg Q2W/Up 150 mg Q2W Without Concomitant Statin",
|
|
76
|
-
OriginalName: "Alirocumab 75 mg Q2W/Up 150 mg Q2W Without Concomitant Statin",
|
|
77
|
-
N: 37,
|
|
78
|
-
age: 59.3,
|
|
79
|
-
ageSD: 11.3,
|
|
80
|
-
male: 37.83783783783784,
|
|
81
|
-
Interventions: [
|
|
82
|
-
{
|
|
83
|
-
termIds: [
|
|
84
|
-
[
|
|
85
|
-
"SUBYEL",
|
|
86
|
-
"SUB_Oc"
|
|
87
|
-
],
|
|
88
|
-
[
|
|
89
|
-
"SUNUVb"
|
|
90
|
-
]
|
|
91
|
-
]
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
analyzeAs: "Alirocumab",
|
|
95
|
-
analyzableScore: 1.0717734625362931,
|
|
96
|
-
matchingScore: 0
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
Id: "zB",
|
|
100
|
-
RefId: "B6|O3~Alirocumab 300 mg Q4W/Up 150 mg Q2W Without Concomitant Statin",
|
|
101
|
-
OriginalName: "Alirocumab 300 mg Q4W/Up 150 mg Q2W Without Concomitant Statin",
|
|
102
|
-
N: 146,
|
|
103
|
-
age: 59.2,
|
|
104
|
-
ageSD: 10.8,
|
|
105
|
-
male: 45.205479452054796,
|
|
106
|
-
Interventions: [
|
|
107
|
-
{
|
|
108
|
-
termIds: [
|
|
109
|
-
[
|
|
110
|
-
"SUBYEL",
|
|
111
|
-
"SUB_Oc"
|
|
112
|
-
]
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
analyzeAs: "Statins",
|
|
117
|
-
analyzableScore: 1.0717734625362931,
|
|
118
|
-
matchingScore: 0
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
Id: "3!",
|
|
122
|
-
RefId: "B4|O1~Placebo Q2W Without Concomitant Statin",
|
|
123
|
-
OriginalName: "Placebo Q2W Without Concomitant Statin",
|
|
124
|
-
N: 73,
|
|
125
|
-
age: 59.4,
|
|
126
|
-
ageSD: 10.2,
|
|
127
|
-
male: 54.794520547945204,
|
|
128
|
-
Interventions: [
|
|
129
|
-
{
|
|
130
|
-
termIds: [
|
|
131
|
-
[
|
|
132
|
-
"SUGeLS"
|
|
133
|
-
],
|
|
134
|
-
[
|
|
135
|
-
"SUBYEL",
|
|
136
|
-
"SUB_Oc"
|
|
137
|
-
]
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
analyzeAs: "Control",
|
|
142
|
-
analyzableScore: 1.2020833333333334,
|
|
143
|
-
matchingScore: 0
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
Id: "tv",
|
|
147
|
-
RefId: "E3",
|
|
148
|
-
OriginalName: "Alirocumab 300 mg Q4W/Up 150 mg Q2W",
|
|
149
|
-
Interventions: [
|
|
150
|
-
{
|
|
151
|
-
termIds: [
|
|
152
|
-
[
|
|
153
|
-
"SUCO54",
|
|
154
|
-
"SUNUVb"
|
|
155
|
-
]
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
Id: "jt",
|
|
162
|
-
RefId: "B3|O3~Alirocumab 300 mg Q4W/Up 150 mg Q2W With Concomitant Statin",
|
|
163
|
-
OriginalName: "Alirocumab 300 mg Q4W/Up 150 mg Q2W With Concomitant Statin",
|
|
164
|
-
N: 312,
|
|
165
|
-
age: 61.6,
|
|
166
|
-
ageSD: 10,
|
|
167
|
-
male: 60.8974358974359,
|
|
168
|
-
Interventions: [
|
|
169
|
-
{
|
|
170
|
-
termIds: [
|
|
171
|
-
[
|
|
172
|
-
"SUBYEL",
|
|
173
|
-
"SUB_Oc"
|
|
174
|
-
]
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
]
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
Id: "5!",
|
|
181
|
-
RefId: "E2",
|
|
182
|
-
OriginalName: "Alirocumab 75 mg Q2W/Up 150 mg Q2W",
|
|
183
|
-
Interventions: [
|
|
184
|
-
{
|
|
185
|
-
termIds: [
|
|
186
|
-
[
|
|
187
|
-
"SUNUVb"
|
|
188
|
-
]
|
|
189
|
-
]
|
|
190
|
-
}
|
|
191
|
-
]
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
Id: "4E",
|
|
195
|
-
RefId: "B2|O2~Alirocumab 75 mg Q2W/Up 150 mg Q2W With Concomitant Statin",
|
|
196
|
-
OriginalName: "Alirocumab 75 mg Q2W/Up 150 mg Q2W With Concomitant Statin",
|
|
197
|
-
N: 78,
|
|
198
|
-
age: 60.7,
|
|
199
|
-
ageSD: 9.1,
|
|
200
|
-
male: 65.38461538461539,
|
|
201
|
-
Interventions: [
|
|
202
|
-
{
|
|
203
|
-
termIds: [
|
|
204
|
-
[
|
|
205
|
-
"SUBYEL",
|
|
206
|
-
"SUB_Oc"
|
|
207
|
-
],
|
|
208
|
-
[
|
|
209
|
-
"SUNUVb"
|
|
210
|
-
]
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
Id: "i4",
|
|
217
|
-
Interventions: [
|
|
218
|
-
{
|
|
219
|
-
Id: "Ya",
|
|
220
|
-
Name: 178613599,
|
|
221
|
-
Treatments: [
|
|
222
|
-
{
|
|
223
|
-
Id: "((",
|
|
224
|
-
Phase: "k)"
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
Type: "Drug",
|
|
228
|
-
termIds: [
|
|
229
|
-
[
|
|
230
|
-
"SUGeLS"
|
|
231
|
-
],
|
|
232
|
-
[
|
|
233
|
-
"SUNUVb"
|
|
234
|
-
]
|
|
235
|
-
],
|
|
236
|
-
terms: [
|
|
237
|
-
[
|
|
238
|
-
"Placebo"
|
|
239
|
-
],
|
|
240
|
-
[
|
|
241
|
-
"Alirocumab"
|
|
242
|
-
]
|
|
243
|
-
]
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
Id: "o)",
|
|
247
|
-
Name: 2159990,
|
|
248
|
-
Treatments: [
|
|
249
|
-
{
|
|
250
|
-
Id: "1$",
|
|
251
|
-
Phase: "k)"
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
Type: "Drug",
|
|
255
|
-
termIds: [
|
|
256
|
-
[
|
|
257
|
-
"SUBYEL"
|
|
258
|
-
]
|
|
259
|
-
],
|
|
260
|
-
terms: [
|
|
261
|
-
[
|
|
262
|
-
"Statins"
|
|
263
|
-
]
|
|
264
|
-
]
|
|
265
|
-
}
|
|
266
|
-
],
|
|
267
|
-
RefId: "E1|Placebo Q2W",
|
|
268
|
-
OriginalName: "Placebo Q2W"
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
Id: "Ls",
|
|
272
|
-
RefId: "B1|O1~Placebo Q2W With Concomitant Statin",
|
|
273
|
-
OriginalName: "Placebo Q2W With Concomitant Statin",
|
|
274
|
-
N: 157,
|
|
275
|
-
age: 61.6,
|
|
276
|
-
ageSD: 9.7,
|
|
277
|
-
male: 64.3312101910828,
|
|
278
|
-
Interventions: [
|
|
279
|
-
{
|
|
280
|
-
termIds: [
|
|
281
|
-
[
|
|
282
|
-
"SUGeLS"
|
|
283
|
-
],
|
|
284
|
-
[
|
|
285
|
-
"SUBYEL",
|
|
286
|
-
"SUB_Oc"
|
|
287
|
-
]
|
|
288
|
-
]
|
|
289
|
-
}
|
|
290
|
-
]
|
|
291
|
-
}
|
|
292
|
-
];
|
|
293
|
-
var hasDocData = true;
|
|
294
|
-
var hasRapidExtract = false;
|
|
295
|
-
var N = 803;
|
|
296
|
-
var queryScore = 1.4868329805051381;
|
|
297
|
-
var matchingScore = 7.960635921410255;
|
|
298
|
-
var score = 22.084654254966498;
|
|
299
|
-
var outcomes = [
|
|
300
|
-
{
|
|
301
|
-
id: "179246387",
|
|
302
|
-
type: "Change",
|
|
303
|
-
unit: "%",
|
|
304
|
-
termIds: [
|
|
305
|
-
[
|
|
306
|
-
"SUF0R",
|
|
307
|
-
"SUBskP"
|
|
308
|
-
]
|
|
309
|
-
],
|
|
310
|
-
quantifiers: [
|
|
311
|
-
],
|
|
312
|
-
name: "Calculated LDL-C in Not Receiving Concomitant Statin Therapy - On-Treatment Analysis",
|
|
313
|
-
cells: [
|
|
314
|
-
{
|
|
315
|
-
number: -0.4,
|
|
316
|
-
unit: "%",
|
|
317
|
-
group: "3!",
|
|
318
|
-
varType: "se",
|
|
319
|
-
N: 70,
|
|
320
|
-
se: 2,
|
|
321
|
-
sd: 16.73
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
number: -54.6,
|
|
325
|
-
unit: "%",
|
|
326
|
-
group: "4r",
|
|
327
|
-
varType: "se",
|
|
328
|
-
N: 37,
|
|
329
|
-
se: 2.8,
|
|
330
|
-
sd: 17.03
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
number: -59.4,
|
|
334
|
-
unit: "%",
|
|
335
|
-
group: "zB",
|
|
336
|
-
varType: "se",
|
|
337
|
-
N: 141,
|
|
338
|
-
se: 1.4,
|
|
339
|
-
sd: 16.62
|
|
340
|
-
}
|
|
341
|
-
],
|
|
342
|
-
time: {
|
|
343
|
-
Id: 67122072,
|
|
344
|
-
Low: {
|
|
345
|
-
Value: "Baseline"
|
|
346
|
-
},
|
|
347
|
-
High: {
|
|
348
|
-
"Number": 24,
|
|
349
|
-
Unit: "wk"
|
|
350
|
-
},
|
|
351
|
-
Type: "Total",
|
|
352
|
-
days: 168,
|
|
353
|
-
description: "24wk"
|
|
354
|
-
},
|
|
355
|
-
score: 2.08,
|
|
356
|
-
matchingTerm: "SUF0R",
|
|
357
|
-
suggestedPositive: false,
|
|
358
|
-
sourceUnit: "%"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
id: "179246389",
|
|
362
|
-
type: "Change",
|
|
363
|
-
unit: "%",
|
|
364
|
-
termIds: [
|
|
365
|
-
[
|
|
366
|
-
"SUF0R",
|
|
367
|
-
"SUBskP"
|
|
368
|
-
]
|
|
369
|
-
],
|
|
370
|
-
quantifiers: [
|
|
371
|
-
],
|
|
372
|
-
name: "Calculated LDL-C in Receiving Concomitant Statin Therapy - On-Treatment Analysis",
|
|
373
|
-
cells: [
|
|
374
|
-
{
|
|
375
|
-
number: -0.3,
|
|
376
|
-
unit: "%",
|
|
377
|
-
group: "Ls",
|
|
378
|
-
varType: "se",
|
|
379
|
-
N: 151,
|
|
380
|
-
se: 2.1,
|
|
381
|
-
sd: 25.81
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
number: -55.1,
|
|
385
|
-
unit: "%",
|
|
386
|
-
group: "4E",
|
|
387
|
-
varType: "se",
|
|
388
|
-
N: 75,
|
|
389
|
-
se: 3,
|
|
390
|
-
sd: 25.98
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
number: -62.3,
|
|
394
|
-
unit: "%",
|
|
395
|
-
group: "jt",
|
|
396
|
-
varType: "se",
|
|
397
|
-
N: 302,
|
|
398
|
-
se: 1.5,
|
|
399
|
-
sd: 26.07
|
|
400
|
-
}
|
|
401
|
-
],
|
|
402
|
-
time: {
|
|
403
|
-
Id: 67122072,
|
|
404
|
-
Low: {
|
|
405
|
-
Value: "Baseline"
|
|
406
|
-
},
|
|
407
|
-
High: {
|
|
408
|
-
"Number": 24,
|
|
409
|
-
Unit: "wk"
|
|
410
|
-
},
|
|
411
|
-
Type: "Total",
|
|
412
|
-
days: 168,
|
|
413
|
-
description: "24wk"
|
|
414
|
-
},
|
|
415
|
-
score: 2.08,
|
|
416
|
-
matchingTerm: "SUF0R",
|
|
417
|
-
suggestedPositive: false,
|
|
418
|
-
sourceUnit: "%"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
id: "179246393",
|
|
422
|
-
type: "Change",
|
|
423
|
-
unit: "%",
|
|
424
|
-
termIds: [
|
|
425
|
-
[
|
|
426
|
-
"SUF0R",
|
|
427
|
-
"SUBskP"
|
|
428
|
-
]
|
|
429
|
-
],
|
|
430
|
-
quantifiers: [
|
|
431
|
-
],
|
|
432
|
-
name: "Calculated LDL-C in Not Receiving Concomitant Statin Therapy - On-Treatment Analysis",
|
|
433
|
-
cells: [
|
|
434
|
-
{
|
|
435
|
-
number: -0.5,
|
|
436
|
-
unit: "%",
|
|
437
|
-
group: "3!",
|
|
438
|
-
varType: "se",
|
|
439
|
-
N: 70,
|
|
440
|
-
se: 2,
|
|
441
|
-
sd: 16.73
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
number: -53.9,
|
|
445
|
-
unit: "%",
|
|
446
|
-
group: "4r",
|
|
447
|
-
varType: "se",
|
|
448
|
-
N: 37,
|
|
449
|
-
se: 2.7,
|
|
450
|
-
sd: 16.42
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
number: -60,
|
|
454
|
-
unit: "%",
|
|
455
|
-
group: "zB",
|
|
456
|
-
varType: "se",
|
|
457
|
-
N: 141,
|
|
458
|
-
se: 1.4,
|
|
459
|
-
sd: 16.62
|
|
460
|
-
}
|
|
461
|
-
],
|
|
462
|
-
time: {
|
|
463
|
-
Id: 67122069,
|
|
464
|
-
Low: {
|
|
465
|
-
Value: "Baseline"
|
|
466
|
-
},
|
|
467
|
-
High: {
|
|
468
|
-
"Number": 12,
|
|
469
|
-
Unit: "wk"
|
|
470
|
-
},
|
|
471
|
-
Type: "Total",
|
|
472
|
-
days: 84,
|
|
473
|
-
description: "12wk"
|
|
474
|
-
},
|
|
475
|
-
score: 2.08,
|
|
476
|
-
matchingTerm: "SUF0R",
|
|
477
|
-
suggestedPositive: false,
|
|
478
|
-
sourceUnit: "%"
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
id: "179246394",
|
|
482
|
-
type: "Change",
|
|
483
|
-
unit: "%",
|
|
484
|
-
termIds: [
|
|
485
|
-
[
|
|
486
|
-
"SUF0R",
|
|
487
|
-
"SUBskP"
|
|
488
|
-
]
|
|
489
|
-
],
|
|
490
|
-
quantifiers: [
|
|
491
|
-
],
|
|
492
|
-
name: "Calculated LDL-C in Receiving Concomitant Statin Therapy - On-Treatment Analysis",
|
|
493
|
-
cells: [
|
|
494
|
-
{
|
|
495
|
-
number: 1.4,
|
|
496
|
-
unit: "%",
|
|
497
|
-
group: "Ls",
|
|
498
|
-
varType: "se",
|
|
499
|
-
N: 151,
|
|
500
|
-
se: 1.9,
|
|
501
|
-
sd: 23.35
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
number: -47.3,
|
|
505
|
-
unit: "%",
|
|
506
|
-
group: "4E",
|
|
507
|
-
varType: "se",
|
|
508
|
-
N: 75,
|
|
509
|
-
se: 2.8,
|
|
510
|
-
sd: 24.25
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
number: -58,
|
|
514
|
-
unit: "%",
|
|
515
|
-
group: "jt",
|
|
516
|
-
varType: "se",
|
|
517
|
-
N: 302,
|
|
518
|
-
se: 1.4,
|
|
519
|
-
sd: 24.33
|
|
520
|
-
}
|
|
521
|
-
],
|
|
522
|
-
time: {
|
|
523
|
-
Id: 67122069,
|
|
524
|
-
Low: {
|
|
525
|
-
Value: "Baseline"
|
|
526
|
-
},
|
|
527
|
-
High: {
|
|
528
|
-
"Number": 12,
|
|
529
|
-
Unit: "wk"
|
|
530
|
-
},
|
|
531
|
-
Type: "Total",
|
|
532
|
-
days: 84,
|
|
533
|
-
description: "12wk"
|
|
534
|
-
},
|
|
535
|
-
score: 2.08,
|
|
536
|
-
matchingTerm: "SUF0R",
|
|
537
|
-
suggestedPositive: false,
|
|
538
|
-
sourceUnit: "%"
|
|
539
|
-
}
|
|
540
|
-
];
|
|
541
|
-
var characteristics = [
|
|
542
|
-
{
|
|
543
|
-
id: "179246354",
|
|
544
|
-
type: "Binary",
|
|
545
|
-
isCharacteristic: true,
|
|
546
|
-
termIds: [
|
|
547
|
-
[
|
|
548
|
-
"SUE_c",
|
|
549
|
-
"SUCbN",
|
|
550
|
-
"SUyJj"
|
|
551
|
-
]
|
|
552
|
-
],
|
|
553
|
-
quantifiers: [
|
|
554
|
-
],
|
|
555
|
-
name: "Patients not having adequate control of their hypercholesterolemia based on their individual level of CVD risk",
|
|
556
|
-
cells: [
|
|
557
|
-
],
|
|
558
|
-
number: 100
|
|
559
|
-
}
|
|
560
|
-
];
|
|
561
|
-
var outcomesScore = 18.97947630112307;
|
|
562
|
-
var sampleData = {
|
|
563
|
-
metadata: metadata,
|
|
564
|
-
design: design,
|
|
565
|
-
conditions: conditions,
|
|
566
|
-
phase: phase,
|
|
567
|
-
name: name,
|
|
568
|
-
trialIds: trialIds,
|
|
569
|
-
acronyms: acronyms,
|
|
570
|
-
outcomeCount: outcomeCount,
|
|
571
|
-
id: id,
|
|
572
|
-
groups: groups,
|
|
573
|
-
hasDocData: hasDocData,
|
|
574
|
-
hasRapidExtract: hasRapidExtract,
|
|
575
|
-
N: N,
|
|
576
|
-
queryScore: queryScore,
|
|
577
|
-
matchingScore: matchingScore,
|
|
578
|
-
score: score,
|
|
579
|
-
outcomes: outcomes,
|
|
580
|
-
characteristics: characteristics,
|
|
581
|
-
outcomesScore: outcomesScore
|
|
582
|
-
};
|
|
583
|
-
|
|
6
|
+
const sampleData = JSON.parse(fs.readFileSync(new URL('./example4.json', (document.currentScript && document.currentScript.src || new URL('test.js', document.baseURI).href))));
|
|
584
7
|
function tryRequire(module) {
|
|
585
8
|
try {
|
|
586
9
|
return require(module)
|
|
@@ -1254,4 +677,4 @@
|
|
|
1254
677
|
});
|
|
1255
678
|
});
|
|
1256
679
|
|
|
1257
|
-
}(msgpackr, chai));
|
|
680
|
+
}(msgpackr, chai, fs));
|
package/node-index.js
CHANGED
|
@@ -16,7 +16,6 @@ function tryRequire(moduleId) {
|
|
|
16
16
|
let require = createRequire(import.meta.url)
|
|
17
17
|
return require(moduleId)
|
|
18
18
|
} catch (error) {
|
|
19
|
-
|
|
20
|
-
console.warn('For browser usage, directly use msgpackr/unpack or msgpackr/pack modules. ' + error.message.split('\n')[0])
|
|
19
|
+
// native module is optional
|
|
21
20
|
}
|
|
22
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "msgpackr",
|
|
3
3
|
"author": "Kris Zyp",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.6",
|
|
5
5
|
"description": "Ultra-fast MessagePack implementation with extensions for records and structured cloning",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"types": "./index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"/*.ts"
|
|
57
57
|
],
|
|
58
58
|
"optionalDependencies": {
|
|
59
|
-
"msgpackr-extract": "^1.
|
|
59
|
+
"msgpackr-extract": "^1.1.4"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@rollup/plugin-json": "^4.1.0",
|