Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonext

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonext - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

80

lib/index.js
'use strict';
var parse = require('./parse');
var stringify = require('./stringify');
var cov_dqfsjl6gi = function () {
var path = 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\index.js',
hash = '8c096d750d612d67007b312fc196dfffa42f863a',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\index.js',
statementMap: {
'0': {
start: {
line: 1,
column: 14
},
end: {
line: 1,
column: 32
}
},
'1': {
start: {
line: 2,
column: 18
},
end: {
line: 2,
column: 40
}
},
'2': {
start: {
line: 4,
column: 16
},
end: {
line: 7,
column: 1
}
},
'3': {
start: {
line: 9,
column: 0
},
end: {
line: 9,
column: 24
}
}
},
fnMap: {},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0
},
f: {},
b: {},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
var JSONext = {
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var parse = (cov_dqfsjl6gi.s[0]++, require('./parse'));
var stringify = (cov_dqfsjl6gi.s[1]++, require('./stringify'));
var JSONext = (cov_dqfsjl6gi.s[2]++, {
parse: parse,
stringify: stringify
};
});
cov_dqfsjl6gi.s[3]++;
module.exports = JSONext;
'use strict';
var fs = require('fs');
var JSONext = require('./');
var cov_8dh6ljkg5 = function () {
var path = 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\register.js',
hash = 'b5f9b0353afb63f12df7516c8860e6c597d1e9d6',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\register.js',
statementMap: {
'0': {
start: {
line: 1,
column: 11
},
end: {
line: 1,
column: 24
}
},
'1': {
start: {
line: 2,
column: 16
},
end: {
line: 2,
column: 29
}
},
'2': {
start: {
line: 5,
column: 0
},
end: {
line: 13,
column: 1
}
},
'3': {
start: {
line: 6,
column: 17
},
end: {
line: 6,
column: 50
}
},
'4': {
start: {
line: 7,
column: 1
},
end: {
line: 12,
column: 2
}
},
'5': {
start: {
line: 8,
column: 2
},
end: {
line: 8,
column: 41
}
},
'6': {
start: {
line: 10,
column: 2
},
end: {
line: 10,
column: 45
}
},
'7': {
start: {
line: 11,
column: 2
},
end: {
line: 11,
column: 11
}
}
},
fnMap: {
'0': {
name: '(anonymous_0)',
decl: {
start: {
line: 5,
column: 33
},
end: {
line: 5,
column: 34
}
},
loc: {
start: {
line: 5,
column: 61
},
end: {
line: 13,
column: 1
}
},
line: 5
}
},
branchMap: {},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0
},
f: {
'0': 0
},
b: {},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var fs = (cov_8dh6ljkg5.s[0]++, require('fs'));
var JSONext = (cov_8dh6ljkg5.s[1]++, require('./'));
// eslint-disable-next-line node/no-deprecated-api
cov_8dh6ljkg5.s[2]++;
require.extensions['.jsonext'] = function (module, filename) {
var content = fs.readFileSync(filename, 'utf8');
cov_8dh6ljkg5.f[0]++;
var content = (cov_8dh6ljkg5.s[3]++, fs.readFileSync(filename, 'utf8'));
cov_8dh6ljkg5.s[4]++;
try {
cov_8dh6ljkg5.s[5]++;
module.exports = JSONext.parse(content);
} catch (err) {
cov_8dh6ljkg5.s[6]++;
err.message = filename + ': ' + err.message;
cov_8dh6ljkg5.s[7]++;
throw err;
}
};
'use strict';
var cov_2ic6k9gh7t = function () {
var path = 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\stringify.js',
hash = '28816ed31d732cf45a80f8b4c79cba29f650add4',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\stringify.js',
statementMap: {
'0': {
start: {
line: 1,
column: 13
},
end: {
line: 1,
column: 30
}
},
'1': {
start: {
line: 10,
column: 1
},
end: {
line: 10,
column: 11
}
},
'2': {
start: {
line: 11,
column: 1
},
end: {
line: 11,
column: 12
}
},
'3': {
start: {
line: 12,
column: 1
},
end: {
line: 12,
column: 25
}
},
'4': {
start: {
line: 13,
column: 1
},
end: {
line: 13,
column: 25
}
},
'5': {
start: {
line: 14,
column: 1
},
end: {
line: 14,
column: 9
}
},
'6': {
start: {
line: 16,
column: 1
},
end: {
line: 33,
column: 2
}
},
'7': {
start: {
line: 17,
column: 2
},
end: {
line: 17,
column: 25
}
},
'8': {
start: {
line: 18,
column: 8
},
end: {
line: 33,
column: 2
}
},
'9': {
start: {
line: 19,
column: 2
},
end: {
line: 19,
column: 19
}
},
'10': {
start: {
line: 20,
column: 2
},
end: {
line: 32,
column: 3
}
},
'11': {
start: {
line: 23,
column: 3
},
end: {
line: 27,
column: 4
}
},
'12': {
start: {
line: 24,
column: 4
},
end: {
line: 24,
column: 12
}
},
'13': {
start: {
line: 25,
column: 10
},
end: {
line: 27,
column: 4
}
},
'14': {
start: {
line: 26,
column: 4
},
end: {
line: 26,
column: 20
}
},
'15': {
start: {
line: 29,
column: 3
},
end: {
line: 31,
column: 4
}
},
'16': {
start: {
line: 30,
column: 4
},
end: {
line: 30,
column: 27
}
},
'17': {
start: {
line: 35,
column: 1
},
end: {
line: 42,
column: 2
}
},
'18': {
start: {
line: 36,
column: 2
},
end: {
line: 39,
column: 3
}
},
'19': {
start: {
line: 37,
column: 3
},
end: {
line: 37,
column: 42
}
},
'20': {
start: {
line: 38,
column: 3
},
end: {
line: 38,
column: 38
}
},
'21': {
start: {
line: 40,
column: 8
},
end: {
line: 42,
column: 2
}
},
'22': {
start: {
line: 41,
column: 2
},
end: {
line: 41,
column: 27
}
},
'23': {
start: {
line: 44,
column: 1
},
end: {
line: 44,
column: 42
}
},
'24': {
start: {
line: 48,
column: 13
},
end: {
line: 48,
column: 24
}
},
'25': {
start: {
line: 49,
column: 1
},
end: {
line: 55,
column: 2
}
},
'26': {
start: {
line: 50,
column: 2
},
end: {
line: 54,
column: 3
}
},
'27': {
start: {
line: 51,
column: 3
},
end: {
line: 51,
column: 31
}
},
'28': {
start: {
line: 52,
column: 9
},
end: {
line: 54,
column: 3
}
},
'29': {
start: {
line: 53,
column: 3
},
end: {
line: 53,
column: 28
}
},
'30': {
start: {
line: 57,
column: 1
},
end: {
line: 59,
column: 2
}
},
'31': {
start: {
line: 58,
column: 2
},
end: {
line: 58,
column: 47
}
},
'32': {
start: {
line: 61,
column: 1
},
end: {
line: 65,
column: 2
}
},
'33': {
start: {
line: 62,
column: 12
},
end: {
line: 62,
column: 25
}
},
'34': {
start: {
line: 63,
column: 12
},
end: {
line: 63,
column: 25
}
},
'35': {
start: {
line: 64,
column: 13
},
end: {
line: 64,
column: 27
}
},
'36': {
start: {
line: 67,
column: 1
},
end: {
line: 69,
column: 2
}
},
'37': {
start: {
line: 68,
column: 2
},
end: {
line: 68,
column: 34
}
},
'38': {
start: {
line: 71,
column: 1
},
end: {
line: 73,
column: 2
}
},
'39': {
start: {
line: 72,
column: 2
},
end: {
line: 72,
column: 49
}
},
'40': {
start: {
line: 75,
column: 1
},
end: {
line: 77,
column: 2
}
},
'41': {
start: {
line: 76,
column: 2
},
end: {
line: 76,
column: 78
}
},
'42': {
start: {
line: 79,
column: 1
},
end: {
line: 79,
column: 17
}
},
'43': {
start: {
line: 83,
column: 16
},
end: {
line: 86,
column: 2
}
},
'44': {
start: {
line: 88,
column: 1
},
end: {
line: 90,
column: 2
}
},
'45': {
start: {
line: 89,
column: 2
},
end: {
line: 89,
column: 19
}
},
'46': {
start: {
line: 92,
column: 22
},
end: {
line: 105,
column: 2
}
},
'47': {
start: {
line: 107,
column: 1
},
end: {
line: 109,
column: 2
}
},
'48': {
start: {
line: 108,
column: 2
},
end: {
line: 108,
column: 27
}
},
'49': {
start: {
line: 111,
column: 15
},
end: {
line: 111,
column: 17
}
},
'50': {
start: {
line: 113,
column: 1
},
end: {
line: 141,
column: 2
}
},
'51': {
start: {
line: 114,
column: 2
},
end: {
line: 127,
column: 3
}
},
'52': {
start: {
line: 117,
column: 3
},
end: {
line: 117,
column: 14
}
},
'53': {
start: {
line: 118,
column: 3
},
end: {
line: 118,
column: 15
}
},
'54': {
start: {
line: 119,
column: 3
},
end: {
line: 119,
column: 11
}
},
'55': {
start: {
line: 122,
column: 3
},
end: {
line: 124,
column: 4
}
},
'56': {
start: {
line: 123,
column: 4
},
end: {
line: 123,
column: 15
}
},
'57': {
start: {
line: 125,
column: 3
},
end: {
line: 125,
column: 15
}
},
'58': {
start: {
line: 126,
column: 3
},
end: {
line: 126,
column: 11
}
},
'59': {
start: {
line: 129,
column: 2
},
end: {
line: 132,
column: 3
}
},
'60': {
start: {
line: 130,
column: 3
},
end: {
line: 130,
column: 29
}
},
'61': {
start: {
line: 131,
column: 3
},
end: {
line: 131,
column: 11
}
},
'62': {
start: {
line: 134,
column: 2
},
end: {
line: 138,
column: 3
}
},
'63': {
start: {
line: 135,
column: 19
},
end: {
line: 135,
column: 47
}
},
'64': {
start: {
line: 136,
column: 3
},
end: {
line: 136,
column: 68
}
},
'65': {
start: {
line: 137,
column: 3
},
end: {
line: 137,
column: 11
}
},
'66': {
start: {
line: 140,
column: 2
},
end: {
line: 140,
column: 14
}
},
'67': {
start: {
line: 143,
column: 15
},
end: {
line: 143,
column: 84
}
},
'68': {
start: {
line: 143,
column: 52
},
end: {
line: 143,
column: 83
}
},
'69': {
start: {
line: 145,
column: 1
},
end: {
line: 145,
column: 71
}
},
'70': {
start: {
line: 147,
column: 1
},
end: {
line: 147,
column: 31
}
},
'71': {
start: {
line: 151,
column: 1
},
end: {
line: 153,
column: 2
}
},
'72': {
start: {
line: 152,
column: 2
},
end: {
line: 152,
column: 61
}
},
'73': {
start: {
line: 155,
column: 1
},
end: {
line: 155,
column: 18
}
},
'74': {
start: {
line: 157,
column: 16
},
end: {
line: 157,
column: 22
}
},
'75': {
start: {
line: 158,
column: 1
},
end: {
line: 158,
column: 22
}
},
'76': {
start: {
line: 160,
column: 12
},
end: {
line: 160,
column: 46
}
},
'77': {
start: {
line: 161,
column: 15
},
end: {
line: 161,
column: 17
}
},
'78': {
start: {
line: 162,
column: 1
},
end: {
line: 172,
column: 2
}
},
'79': {
start: {
line: 163,
column: 25
},
end: {
line: 163,
column: 54
}
},
'80': {
start: {
line: 164,
column: 2
},
end: {
line: 171,
column: 3
}
},
'81': {
start: {
line: 165,
column: 16
},
end: {
line: 165,
column: 39
}
},
'82': {
start: {
line: 166,
column: 3
},
end: {
line: 168,
column: 4
}
},
'83': {
start: {
line: 167,
column: 4
},
end: {
line: 167,
column: 17
}
},
'84': {
start: {
line: 169,
column: 3
},
end: {
line: 169,
column: 27
}
},
'85': {
start: {
line: 170,
column: 3
},
end: {
line: 170,
column: 23
}
},
'86': {
start: {
line: 175,
column: 1
},
end: {
line: 187,
column: 2
}
},
'87': {
start: {
line: 176,
column: 2
},
end: {
line: 176,
column: 14
}
},
'88': {
start: {
line: 179,
column: 2
},
end: {
line: 186,
column: 3
}
},
'89': {
start: {
line: 180,
column: 3
},
end: {
line: 180,
column: 33
}
},
'90': {
start: {
line: 181,
column: 3
},
end: {
line: 181,
column: 33
}
},
'91': {
start: {
line: 183,
column: 19
},
end: {
line: 183,
column: 33
}
},
'92': {
start: {
line: 184,
column: 3
},
end: {
line: 184,
column: 39
}
},
'93': {
start: {
line: 185,
column: 3
},
end: {
line: 185,
column: 63
}
},
'94': {
start: {
line: 189,
column: 1
},
end: {
line: 189,
column: 12
}
},
'95': {
start: {
line: 190,
column: 1
},
end: {
line: 190,
column: 18
}
},
'96': {
start: {
line: 191,
column: 1
},
end: {
line: 191,
column: 13
}
},
'97': {
start: {
line: 195,
column: 19
},
end: {
line: 195,
column: 59
}
},
'98': {
start: {
line: 196,
column: 1
},
end: {
line: 198,
column: 2
}
},
'99': {
start: {
line: 197,
column: 2
},
end: {
line: 197,
column: 31
}
},
'100': {
start: {
line: 200,
column: 1
},
end: {
line: 204,
column: 2
}
},
'101': {
start: {
line: 201,
column: 2
},
end: {
line: 203,
column: 3
}
},
'102': {
start: {
line: 202,
column: 3
},
end: {
line: 202,
column: 32
}
},
'103': {
start: {
line: 206,
column: 1
},
end: {
line: 206,
column: 11
}
},
'104': {
start: {
line: 210,
column: 1
},
end: {
line: 212,
column: 2
}
},
'105': {
start: {
line: 211,
column: 2
},
end: {
line: 211,
column: 61
}
},
'106': {
start: {
line: 214,
column: 1
},
end: {
line: 214,
column: 18
}
},
'107': {
start: {
line: 216,
column: 16
},
end: {
line: 216,
column: 22
}
},
'108': {
start: {
line: 217,
column: 1
},
end: {
line: 217,
column: 22
}
},
'109': {
start: {
line: 219,
column: 15
},
end: {
line: 219,
column: 17
}
},
'110': {
start: {
line: 220,
column: 1
},
end: {
line: 223,
column: 2
}
},
'111': {
start: {
line: 221,
column: 25
},
end: {
line: 221,
column: 60
}
},
'112': {
start: {
line: 222,
column: 2
},
end: {
line: 222,
column: 72
}
},
'113': {
start: {
line: 226,
column: 1
},
end: {
line: 237,
column: 2
}
},
'114': {
start: {
line: 227,
column: 2
},
end: {
line: 227,
column: 14
}
},
'115': {
start: {
line: 229,
column: 2
},
end: {
line: 236,
column: 3
}
},
'116': {
start: {
line: 230,
column: 20
},
end: {
line: 230,
column: 37
}
},
'117': {
start: {
line: 231,
column: 3
},
end: {
line: 231,
column: 33
}
},
'118': {
start: {
line: 233,
column: 19
},
end: {
line: 233,
column: 33
}
},
'119': {
start: {
line: 234,
column: 20
},
end: {
line: 234,
column: 43
}
},
'120': {
start: {
line: 235,
column: 3
},
end: {
line: 235,
column: 63
}
},
'121': {
start: {
line: 239,
column: 1
},
end: {
line: 239,
column: 12
}
},
'122': {
start: {
line: 240,
column: 1
},
end: {
line: 240,
column: 18
}
},
'123': {
start: {
line: 241,
column: 1
},
end: {
line: 241,
column: 13
}
},
'124': {
start: {
line: 244,
column: 0
},
end: {
line: 244,
column: 26
}
}
},
fnMap: {
'0': {
name: 'stringify',
decl: {
start: {
line: 9,
column: 9
},
end: {
line: 9,
column: 18
}
},
loc: {
start: {
line: 9,
column: 44
},
end: {
line: 45,
column: 1
}
},
line: 9
},
'1': {
name: 'serializeProperty',
decl: {
start: {
line: 47,
column: 9
},
end: {
line: 47,
column: 26
}
},
loc: {
start: {
line: 47,
column: 41
},
end: {
line: 80,
column: 1
}
},
line: 47
},
'2': {
name: 'quoteString',
decl: {
start: {
line: 82,
column: 9
},
end: {
line: 82,
column: 20
}
},
loc: {
start: {
line: 82,
column: 36
},
end: {
line: 148,
column: 1
}
},
line: 82
},
'3': {
name: '(anonymous_3)',
decl: {
start: {
line: 143,
column: 42
},
end: {
line: 143,
column: 43
}
},
loc: {
start: {
line: 143,
column: 52
},
end: {
line: 143,
column: 83
}
},
line: 143
},
'4': {
name: 'serializeObject',
decl: {
start: {
line: 150,
column: 9
},
end: {
line: 150,
column: 24
}
},
loc: {
start: {
line: 150,
column: 33
},
end: {
line: 192,
column: 1
}
},
line: 150
},
'5': {
name: 'serializeKey',
decl: {
start: {
line: 194,
column: 9
},
end: {
line: 194,
column: 21
}
},
loc: {
start: {
line: 194,
column: 28
},
end: {
line: 207,
column: 1
}
},
line: 194
},
'6': {
name: 'serializeArray',
decl: {
start: {
line: 209,
column: 9
},
end: {
line: 209,
column: 23
}
},
loc: {
start: {
line: 209,
column: 32
},
end: {
line: 242,
column: 1
}
},
line: 209
}
},
branchMap: {
'0': {
loc: {
start: {
line: 16,
column: 1
},
end: {
line: 33,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 16,
column: 1
},
end: {
line: 33,
column: 2
}
}, {
start: {
line: 16,
column: 1
},
end: {
line: 33,
column: 2
}
}],
line: 16
},
'1': {
loc: {
start: {
line: 18,
column: 8
},
end: {
line: 33,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 18,
column: 8
},
end: {
line: 33,
column: 2
}
}, {
start: {
line: 18,
column: 8
},
end: {
line: 33,
column: 2
}
}],
line: 18
},
'2': {
loc: {
start: {
line: 23,
column: 3
},
end: {
line: 27,
column: 4
}
},
type: 'if',
locations: [{
start: {
line: 23,
column: 3
},
end: {
line: 27,
column: 4
}
}, {
start: {
line: 23,
column: 3
},
end: {
line: 27,
column: 4
}
}],
line: 23
},
'3': {
loc: {
start: {
line: 25,
column: 10
},
end: {
line: 27,
column: 4
}
},
type: 'if',
locations: [{
start: {
line: 25,
column: 10
},
end: {
line: 27,
column: 4
}
}, {
start: {
line: 25,
column: 10
},
end: {
line: 27,
column: 4
}
}],
line: 25
},
'4': {
loc: {
start: {
line: 29,
column: 3
},
end: {
line: 31,
column: 4
}
},
type: 'if',
locations: [{
start: {
line: 29,
column: 3
},
end: {
line: 31,
column: 4
}
}, {
start: {
line: 29,
column: 3
},
end: {
line: 31,
column: 4
}
}],
line: 29
},
'5': {
loc: {
start: {
line: 29,
column: 7
},
end: {
line: 29,
column: 59
}
},
type: 'binary-expr',
locations: [{
start: {
line: 29,
column: 7
},
end: {
line: 29,
column: 25
}
}, {
start: {
line: 29,
column: 29
},
end: {
line: 29,
column: 59
}
}],
line: 29
},
'6': {
loc: {
start: {
line: 35,
column: 1
},
end: {
line: 42,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 35,
column: 1
},
end: {
line: 42,
column: 2
}
}, {
start: {
line: 35,
column: 1
},
end: {
line: 42,
column: 2
}
}],
line: 35
},
'7': {
loc: {
start: {
line: 36,
column: 2
},
end: {
line: 39,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 36,
column: 2
},
end: {
line: 39,
column: 3
}
}, {
start: {
line: 36,
column: 2
},
end: {
line: 39,
column: 3
}
}],
line: 36
},
'8': {
loc: {
start: {
line: 40,
column: 8
},
end: {
line: 42,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 40,
column: 8
},
end: {
line: 42,
column: 2
}
}, {
start: {
line: 40,
column: 8
},
end: {
line: 42,
column: 2
}
}],
line: 40
},
'9': {
loc: {
start: {
line: 49,
column: 1
},
end: {
line: 55,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 49,
column: 1
},
end: {
line: 55,
column: 2
}
}, {
start: {
line: 49,
column: 1
},
end: {
line: 55,
column: 2
}
}],
line: 49
},
'10': {
loc: {
start: {
line: 50,
column: 2
},
end: {
line: 54,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 50,
column: 2
},
end: {
line: 54,
column: 3
}
}, {
start: {
line: 50,
column: 2
},
end: {
line: 54,
column: 3
}
}],
line: 50
},
'11': {
loc: {
start: {
line: 52,
column: 9
},
end: {
line: 54,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 52,
column: 9
},
end: {
line: 54,
column: 3
}
}, {
start: {
line: 52,
column: 9
},
end: {
line: 54,
column: 3
}
}],
line: 52
},
'12': {
loc: {
start: {
line: 57,
column: 1
},
end: {
line: 59,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 57,
column: 1
},
end: {
line: 59,
column: 2
}
}, {
start: {
line: 57,
column: 1
},
end: {
line: 59,
column: 2
}
}],
line: 57
},
'13': {
loc: {
start: {
line: 61,
column: 1
},
end: {
line: 65,
column: 2
}
},
type: 'switch',
locations: [{
start: {
line: 62,
column: 1
},
end: {
line: 62,
column: 25
}
}, {
start: {
line: 63,
column: 1
},
end: {
line: 63,
column: 25
}
}, {
start: {
line: 64,
column: 1
},
end: {
line: 64,
column: 27
}
}],
line: 61
},
'14': {
loc: {
start: {
line: 67,
column: 1
},
end: {
line: 69,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 67,
column: 1
},
end: {
line: 69,
column: 2
}
}, {
start: {
line: 67,
column: 1
},
end: {
line: 69,
column: 2
}
}],
line: 67
},
'15': {
loc: {
start: {
line: 71,
column: 1
},
end: {
line: 73,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 71,
column: 1
},
end: {
line: 73,
column: 2
}
}, {
start: {
line: 71,
column: 1
},
end: {
line: 73,
column: 2
}
}],
line: 71
},
'16': {
loc: {
start: {
line: 72,
column: 9
},
end: {
line: 72,
column: 49
}
},
type: 'cond-expr',
locations: [{
start: {
line: 72,
column: 27
},
end: {
line: 72,
column: 40
}
}, {
start: {
line: 72,
column: 43
},
end: {
line: 72,
column: 49
}
}],
line: 72
},
'17': {
loc: {
start: {
line: 75,
column: 1
},
end: {
line: 77,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 75,
column: 1
},
end: {
line: 77,
column: 2
}
}, {
start: {
line: 75,
column: 1
},
end: {
line: 77,
column: 2
}
}],
line: 75
},
'18': {
loc: {
start: {
line: 76,
column: 9
},
end: {
line: 76,
column: 78
}
},
type: 'cond-expr',
locations: [{
start: {
line: 76,
column: 32
},
end: {
line: 76,
column: 53
}
}, {
start: {
line: 76,
column: 56
},
end: {
line: 76,
column: 78
}
}],
line: 76
},
'19': {
loc: {
start: {
line: 88,
column: 1
},
end: {
line: 90,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 88,
column: 1
},
end: {
line: 90,
column: 2
}
}, {
start: {
line: 88,
column: 1
},
end: {
line: 90,
column: 2
}
}],
line: 88
},
'20': {
loc: {
start: {
line: 107,
column: 1
},
end: {
line: 109,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 107,
column: 1
},
end: {
line: 109,
column: 2
}
}, {
start: {
line: 107,
column: 1
},
end: {
line: 109,
column: 2
}
}],
line: 107
},
'21': {
loc: {
start: {
line: 114,
column: 2
},
end: {
line: 127,
column: 3
}
},
type: 'switch',
locations: [{
start: {
line: 115,
column: 2
},
end: {
line: 115,
column: 11
}
}, {
start: {
line: 116,
column: 2
},
end: {
line: 119,
column: 11
}
}, {
start: {
line: 121,
column: 2
},
end: {
line: 126,
column: 11
}
}],
line: 114
},
'22': {
loc: {
start: {
line: 122,
column: 3
},
end: {
line: 124,
column: 4
}
},
type: 'if',
locations: [{
start: {
line: 122,
column: 3
},
end: {
line: 124,
column: 4
}
}, {
start: {
line: 122,
column: 3
},
end: {
line: 124,
column: 4
}
}],
line: 122
},
'23': {
loc: {
start: {
line: 129,
column: 2
},
end: {
line: 132,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 129,
column: 2
},
end: {
line: 132,
column: 3
}
}, {
start: {
line: 129,
column: 2
},
end: {
line: 132,
column: 3
}
}],
line: 129
},
'24': {
loc: {
start: {
line: 134,
column: 2
},
end: {
line: 138,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 134,
column: 2
},
end: {
line: 138,
column: 3
}
}, {
start: {
line: 134,
column: 2
},
end: {
line: 138,
column: 3
}
}],
line: 134
},
'25': {
loc: {
start: {
line: 143,
column: 52
},
end: {
line: 143,
column: 83
}
},
type: 'cond-expr',
locations: [{
start: {
line: 143,
column: 78
},
end: {
line: 143,
column: 79
}
}, {
start: {
line: 143,
column: 82
},
end: {
line: 143,
column: 83
}
}],
line: 143
},
'26': {
loc: {
start: {
line: 151,
column: 1
},
end: {
line: 153,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 151,
column: 1
},
end: {
line: 153,
column: 2
}
}, {
start: {
line: 151,
column: 1
},
end: {
line: 153,
column: 2
}
}],
line: 151
},
'27': {
loc: {
start: {
line: 160,
column: 12
},
end: {
line: 160,
column: 46
}
},
type: 'binary-expr',
locations: [{
start: {
line: 160,
column: 12
},
end: {
line: 160,
column: 24
}
}, {
start: {
line: 160,
column: 28
},
end: {
line: 160,
column: 46
}
}],
line: 160
},
'28': {
loc: {
start: {
line: 164,
column: 2
},
end: {
line: 171,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 164,
column: 2
},
end: {
line: 171,
column: 3
}
}, {
start: {
line: 164,
column: 2
},
end: {
line: 171,
column: 3
}
}],
line: 164
},
'29': {
loc: {
start: {
line: 166,
column: 3
},
end: {
line: 168,
column: 4
}
},
type: 'if',
locations: [{
start: {
line: 166,
column: 3
},
end: {
line: 168,
column: 4
}
}, {
start: {
line: 166,
column: 3
},
end: {
line: 168,
column: 4
}
}],
line: 166
},
'30': {
loc: {
start: {
line: 175,
column: 1
},
end: {
line: 187,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 175,
column: 1
},
end: {
line: 187,
column: 2
}
}, {
start: {
line: 175,
column: 1
},
end: {
line: 187,
column: 2
}
}],
line: 175
},
'31': {
loc: {
start: {
line: 179,
column: 2
},
end: {
line: 186,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 179,
column: 2
},
end: {
line: 186,
column: 3
}
}, {
start: {
line: 179,
column: 2
},
end: {
line: 186,
column: 3
}
}],
line: 179
},
'32': {
loc: {
start: {
line: 196,
column: 1
},
end: {
line: 198,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 196,
column: 1
},
end: {
line: 198,
column: 2
}
}, {
start: {
line: 196,
column: 1
},
end: {
line: 198,
column: 2
}
}],
line: 196
},
'33': {
loc: {
start: {
line: 201,
column: 2
},
end: {
line: 203,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 201,
column: 2
},
end: {
line: 203,
column: 3
}
}, {
start: {
line: 201,
column: 2
},
end: {
line: 203,
column: 3
}
}],
line: 201
},
'34': {
loc: {
start: {
line: 210,
column: 1
},
end: {
line: 212,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 210,
column: 1
},
end: {
line: 212,
column: 2
}
}, {
start: {
line: 210,
column: 1
},
end: {
line: 212,
column: 2
}
}],
line: 210
},
'35': {
loc: {
start: {
line: 222,
column: 15
},
end: {
line: 222,
column: 71
}
},
type: 'cond-expr',
locations: [{
start: {
line: 222,
column: 48
},
end: {
line: 222,
column: 62
}
}, {
start: {
line: 222,
column: 65
},
end: {
line: 222,
column: 71
}
}],
line: 222
},
'36': {
loc: {
start: {
line: 226,
column: 1
},
end: {
line: 237,
column: 2
}
},
type: 'if',
locations: [{
start: {
line: 226,
column: 1
},
end: {
line: 237,
column: 2
}
}, {
start: {
line: 226,
column: 1
},
end: {
line: 237,
column: 2
}
}],
line: 226
},
'37': {
loc: {
start: {
line: 229,
column: 2
},
end: {
line: 236,
column: 3
}
},
type: 'if',
locations: [{
start: {
line: 229,
column: 2
},
end: {
line: 236,
column: 3
}
}, {
start: {
line: 229,
column: 2
},
end: {
line: 236,
column: 3
}
}],
line: 229
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0,
'7': 0,
'8': 0,
'9': 0,
'10': 0,
'11': 0,
'12': 0,
'13': 0,
'14': 0,
'15': 0,
'16': 0,
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0,
'25': 0,
'26': 0,
'27': 0,
'28': 0,
'29': 0,
'30': 0,
'31': 0,
'32': 0,
'33': 0,
'34': 0,
'35': 0,
'36': 0,
'37': 0,
'38': 0,
'39': 0,
'40': 0,
'41': 0,
'42': 0,
'43': 0,
'44': 0,
'45': 0,
'46': 0,
'47': 0,
'48': 0,
'49': 0,
'50': 0,
'51': 0,
'52': 0,
'53': 0,
'54': 0,
'55': 0,
'56': 0,
'57': 0,
'58': 0,
'59': 0,
'60': 0,
'61': 0,
'62': 0,
'63': 0,
'64': 0,
'65': 0,
'66': 0,
'67': 0,
'68': 0,
'69': 0,
'70': 0,
'71': 0,
'72': 0,
'73': 0,
'74': 0,
'75': 0,
'76': 0,
'77': 0,
'78': 0,
'79': 0,
'80': 0,
'81': 0,
'82': 0,
'83': 0,
'84': 0,
'85': 0,
'86': 0,
'87': 0,
'88': 0,
'89': 0,
'90': 0,
'91': 0,
'92': 0,
'93': 0,
'94': 0,
'95': 0,
'96': 0,
'97': 0,
'98': 0,
'99': 0,
'100': 0,
'101': 0,
'102': 0,
'103': 0,
'104': 0,
'105': 0,
'106': 0,
'107': 0,
'108': 0,
'109': 0,
'110': 0,
'111': 0,
'112': 0,
'113': 0,
'114': 0,
'115': 0,
'116': 0,
'117': 0,
'118': 0,
'119': 0,
'120': 0,
'121': 0,
'122': 0,
'123': 0,
'124': 0
},
f: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0
},
b: {
'0': [0, 0],
'1': [0, 0],
'2': [0, 0],
'3': [0, 0],
'4': [0, 0],
'5': [0, 0],
'6': [0, 0],
'7': [0, 0],
'8': [0, 0],
'9': [0, 0],
'10': [0, 0],
'11': [0, 0],
'12': [0, 0],
'13': [0, 0, 0],
'14': [0, 0],
'15': [0, 0],
'16': [0, 0],
'17': [0, 0],
'18': [0, 0],
'19': [0, 0],
'20': [0, 0],
'21': [0, 0, 0],
'22': [0, 0],
'23': [0, 0],
'24': [0, 0],
'25': [0, 0],
'26': [0, 0],
'27': [0, 0],
'28': [0, 0],
'29': [0, 0],
'30': [0, 0],
'31': [0, 0],
'32': [0, 0],
'33': [0, 0],
'34': [0, 0],
'35': [0, 0],
'36': [0, 0],
'37': [0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var util = require('./util');
var util = (cov_2ic6k9gh7t.s[0]++, require('./util'));

@@ -14,57 +2905,111 @@ var stack = void 0;

function stringify(value, replacer, space) {
cov_2ic6k9gh7t.f[0]++;
cov_2ic6k9gh7t.s[1]++;
stack = [];
cov_2ic6k9gh7t.s[2]++;
indent = '';
cov_2ic6k9gh7t.s[3]++;
propertyList = undefined;
cov_2ic6k9gh7t.s[4]++;
replacerFunc = undefined;
cov_2ic6k9gh7t.s[5]++;
gap = '';
cov_2ic6k9gh7t.s[6]++;
if (typeof replacer === 'function') {
cov_2ic6k9gh7t.b[0][0]++;
cov_2ic6k9gh7t.s[7]++;
replacerFunc = replacer;
} else if (Array.isArray(replacer)) {
propertyList = [];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
} else {
cov_2ic6k9gh7t.b[0][1]++;
cov_2ic6k9gh7t.s[8]++;
if (Array.isArray(replacer)) {
cov_2ic6k9gh7t.b[1][0]++;
cov_2ic6k9gh7t.s[9]++;
try {
for (var _iterator = replacer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var v = _step.value;
propertyList = [];
cov_2ic6k9gh7t.s[10]++;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var item = void 0;
try {
for (var _iterator = replacer[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var v = _step.value;
if (typeof v === 'string') {
item = v;
} else if (typeof v === 'number') {
item = String(v);
}
var item = void 0;
if (item !== undefined && propertyList.indexOf(item) < 0) {
propertyList.push(item);
cov_2ic6k9gh7t.s[11]++;
if (typeof v === 'string') {
cov_2ic6k9gh7t.b[2][0]++;
cov_2ic6k9gh7t.s[12]++;
item = v;
} else {
cov_2ic6k9gh7t.b[2][1]++;
cov_2ic6k9gh7t.s[13]++;
if (typeof v === 'number') {
cov_2ic6k9gh7t.b[3][0]++;
cov_2ic6k9gh7t.s[14]++;
item = String(v);
} else {
cov_2ic6k9gh7t.b[3][1]++;
}
}cov_2ic6k9gh7t.s[15]++;
if ((cov_2ic6k9gh7t.b[5][0]++, item !== undefined) && (cov_2ic6k9gh7t.b[5][1]++, propertyList.indexOf(item) < 0)) {
cov_2ic6k9gh7t.b[4][0]++;
cov_2ic6k9gh7t.s[16]++;
propertyList.push(item);
} else {
cov_2ic6k9gh7t.b[4][1]++;
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
} else {
cov_2ic6k9gh7t.b[1][1]++;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}
}cov_2ic6k9gh7t.s[17]++;
if (typeof space === 'number') {
cov_2ic6k9gh7t.b[6][0]++;
cov_2ic6k9gh7t.s[18]++;
if (typeof space === 'number') {
if (space > 0) {
cov_2ic6k9gh7t.b[7][0]++;
cov_2ic6k9gh7t.s[19]++;
space = Math.min(10, Math.floor(space));
cov_2ic6k9gh7t.s[20]++;
gap = ' '.substr(0, space);
} else {
cov_2ic6k9gh7t.b[7][1]++;
}
} else if (typeof space === 'string') {
gap = space.substr(0, 10);
}
} else {
cov_2ic6k9gh7t.b[6][1]++;
cov_2ic6k9gh7t.s[21]++;
if (typeof space === 'string') {
cov_2ic6k9gh7t.b[8][0]++;
cov_2ic6k9gh7t.s[22]++;
gap = space.substr(0, 10);
} else {
cov_2ic6k9gh7t.b[8][1]++;
}
}cov_2ic6k9gh7t.s[23]++;
return serializeProperty('', { '': value });

@@ -74,36 +3019,88 @@ }

function serializeProperty(key, holder) {
var value = holder[key];
cov_2ic6k9gh7t.f[1]++;
var value = (cov_2ic6k9gh7t.s[24]++, holder[key]);
cov_2ic6k9gh7t.s[25]++;
if (value != null) {
cov_2ic6k9gh7t.b[9][0]++;
cov_2ic6k9gh7t.s[26]++;
if (typeof value.toJSONext === 'function') {
cov_2ic6k9gh7t.b[10][0]++;
cov_2ic6k9gh7t.s[27]++;
value = value.toJSONext(key);
} else if (typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
} else {
cov_2ic6k9gh7t.b[10][1]++;
cov_2ic6k9gh7t.s[28]++;
if (typeof value.toJSON === 'function') {
cov_2ic6k9gh7t.b[11][0]++;
cov_2ic6k9gh7t.s[29]++;
value = value.toJSON(key);
} else {
cov_2ic6k9gh7t.b[11][1]++;
}
}
} else {
cov_2ic6k9gh7t.b[9][1]++;
}
cov_2ic6k9gh7t.s[30]++;
if (replacerFunc) {
cov_2ic6k9gh7t.b[12][0]++;
cov_2ic6k9gh7t.s[31]++;
value = replacerFunc.call(holder, key, value);
} else {
cov_2ic6k9gh7t.b[12][1]++;
}
cov_2ic6k9gh7t.s[32]++;
switch (value) {
case null:
cov_2ic6k9gh7t.b[13][0]++;
cov_2ic6k9gh7t.s[33]++;
return 'null';
case true:
cov_2ic6k9gh7t.b[13][1]++;
cov_2ic6k9gh7t.s[34]++;
return 'true';
case false:
cov_2ic6k9gh7t.b[13][2]++;
cov_2ic6k9gh7t.s[35]++;
return 'false';
}
cov_2ic6k9gh7t.s[36]++;
if (typeof value === 'string') {
cov_2ic6k9gh7t.b[14][0]++;
cov_2ic6k9gh7t.s[37]++;
return quoteString(value, false);
} else {
cov_2ic6k9gh7t.b[14][1]++;
}
cov_2ic6k9gh7t.s[38]++;
if (typeof value === 'number') {
return isFinite(value) ? String(value) : 'null';
cov_2ic6k9gh7t.b[15][0]++;
cov_2ic6k9gh7t.s[39]++;
return isFinite(value) ? (cov_2ic6k9gh7t.b[16][0]++, String(value)) : (cov_2ic6k9gh7t.b[16][1]++, 'null');
} else {
cov_2ic6k9gh7t.b[15][1]++;
}
cov_2ic6k9gh7t.s[40]++;
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
return Array.isArray(value) ? serializeArray(value) : serializeObject(value);
cov_2ic6k9gh7t.b[17][0]++;
cov_2ic6k9gh7t.s[41]++;
return Array.isArray(value) ? (cov_2ic6k9gh7t.b[18][0]++, serializeArray(value)) : (cov_2ic6k9gh7t.b[18][1]++, serializeObject(value));
} else {
cov_2ic6k9gh7t.b[17][1]++;
}
cov_2ic6k9gh7t.s[42]++;
return undefined;

@@ -113,12 +3110,20 @@ }

function quoteString(value, isKey) {
var quotes = {
cov_2ic6k9gh7t.f[2]++;
var quotes = (cov_2ic6k9gh7t.s[43]++, {
"'": 0.1,
'"': 0.2
};
});
cov_2ic6k9gh7t.s[44]++;
if (!isKey) {
cov_2ic6k9gh7t.b[19][0]++;
cov_2ic6k9gh7t.s[45]++;
quotes['`'] = 0.3;
} else {
cov_2ic6k9gh7t.b[19][1]++;
}
var replacements = {
var replacements = (cov_2ic6k9gh7t.s[46]++, {
"'": "\\'",

@@ -136,10 +3141,17 @@ '"': '\\"',

'\u2029': '\\u2029'
};
});
cov_2ic6k9gh7t.s[47]++;
if (!isKey) {
cov_2ic6k9gh7t.b[20][0]++;
cov_2ic6k9gh7t.s[48]++;
replacements['`'] = '\\`';
} else {
cov_2ic6k9gh7t.b[20][1]++;
}
var product = '';
var product = (cov_2ic6k9gh7t.s[49]++, '');
cov_2ic6k9gh7t.s[50]++;
var _iteratorNormalCompletion2 = true;

@@ -152,29 +3164,62 @@ var _didIteratorError2 = false;

var c = _step2.value;
cov_2ic6k9gh7t.s[51]++;
switch (c) {
case "'":
cov_2ic6k9gh7t.b[21][0]++;
case '"':
cov_2ic6k9gh7t.b[21][1]++;
cov_2ic6k9gh7t.s[52]++;
quotes[c]++;
cov_2ic6k9gh7t.s[53]++;
product += c;
cov_2ic6k9gh7t.s[54]++;
continue;
case '`':
cov_2ic6k9gh7t.b[21][2]++;
cov_2ic6k9gh7t.s[55]++;
if (!isKey) {
cov_2ic6k9gh7t.b[22][0]++;
cov_2ic6k9gh7t.s[56]++;
quotes[c]++;
} else {
cov_2ic6k9gh7t.b[22][1]++;
}
cov_2ic6k9gh7t.s[57]++;
product += c;
cov_2ic6k9gh7t.s[58]++;
continue;
}
cov_2ic6k9gh7t.s[59]++;
if (replacements[c]) {
cov_2ic6k9gh7t.b[23][0]++;
cov_2ic6k9gh7t.s[60]++;
product += replacements[c];
cov_2ic6k9gh7t.s[61]++;
continue;
} else {
cov_2ic6k9gh7t.b[23][1]++;
}
cov_2ic6k9gh7t.s[62]++;
if (c < ' ') {
var hexString = c.charCodeAt(0).toString(16);
cov_2ic6k9gh7t.b[24][0]++;
var hexString = (cov_2ic6k9gh7t.s[63]++, c.charCodeAt(0).toString(16));
cov_2ic6k9gh7t.s[64]++;
product += '\\x' + ('00' + hexString).substring(hexString.length);
cov_2ic6k9gh7t.s[65]++;
continue;
} else {
cov_2ic6k9gh7t.b[24][1]++;
}
cov_2ic6k9gh7t.s[66]++;
product += c;

@@ -197,8 +3242,12 @@ }

var quote = Object.keys(quotes).reduce(function (a, b) {
return quotes[a] < quotes[b] ? a : b;
});
var quote = (cov_2ic6k9gh7t.s[67]++, Object.keys(quotes).reduce(function (a, b) {
cov_2ic6k9gh7t.f[3]++;
cov_2ic6k9gh7t.s[68]++;
return quotes[a] < quotes[b] ? (cov_2ic6k9gh7t.b[25][0]++, a) : (cov_2ic6k9gh7t.b[25][1]++, b);
}));
cov_2ic6k9gh7t.s[69]++;
product = product.replace(new RegExp(quote, 'g'), replacements[quote]);
cov_2ic6k9gh7t.s[70]++;
return quote + product + quote;

@@ -208,13 +3257,24 @@ }

function serializeObject(value) {
cov_2ic6k9gh7t.f[4]++;
cov_2ic6k9gh7t.s[71]++;
if (stack.indexOf(value) >= 0) {
cov_2ic6k9gh7t.b[26][0]++;
cov_2ic6k9gh7t.s[72]++;
throw TypeError('Converting circular structure to JSONext');
} else {
cov_2ic6k9gh7t.b[26][1]++;
}
cov_2ic6k9gh7t.s[73]++;
stack.push(value);
var stepback = indent;
var stepback = (cov_2ic6k9gh7t.s[74]++, indent);
cov_2ic6k9gh7t.s[75]++;
indent = indent + gap;
var keys = propertyList || Object.keys(value);
var partial = [];
var keys = (cov_2ic6k9gh7t.s[76]++, (cov_2ic6k9gh7t.b[27][0]++, propertyList) || (cov_2ic6k9gh7t.b[27][1]++, Object.keys(value)));
var partial = (cov_2ic6k9gh7t.s[77]++, []);
cov_2ic6k9gh7t.s[78]++;
var _iteratorNormalCompletion3 = true;

@@ -228,10 +3288,23 @@ var _didIteratorError3 = false;

var propertyString = serializeProperty(key, value);
var propertyString = (cov_2ic6k9gh7t.s[79]++, serializeProperty(key, value));
cov_2ic6k9gh7t.s[80]++;
if (propertyString !== undefined) {
var member = serializeKey(key) + ':';
cov_2ic6k9gh7t.b[28][0]++;
var member = (cov_2ic6k9gh7t.s[81]++, serializeKey(key) + ':');
cov_2ic6k9gh7t.s[82]++;
if (gap !== '') {
cov_2ic6k9gh7t.b[29][0]++;
cov_2ic6k9gh7t.s[83]++;
member += ' ';
} else {
cov_2ic6k9gh7t.b[29][1]++;
}
cov_2ic6k9gh7t.s[84]++;
member += propertyString;
cov_2ic6k9gh7t.s[85]++;
partial.push(member);
} else {
cov_2ic6k9gh7t.b[28][1]++;
}

@@ -255,12 +3328,27 @@ }

var final = void 0;
cov_2ic6k9gh7t.s[86]++;
if (partial.length === 0) {
cov_2ic6k9gh7t.b[30][0]++;
cov_2ic6k9gh7t.s[87]++;
final = '{}';
} else {
cov_2ic6k9gh7t.b[30][1]++;
var properties = void 0;
cov_2ic6k9gh7t.s[88]++;
if (gap === '') {
cov_2ic6k9gh7t.b[31][0]++;
cov_2ic6k9gh7t.s[89]++;
properties = partial.join(',');
cov_2ic6k9gh7t.s[90]++;
final = '{' + properties + '}';
} else {
var separator = ',\n' + indent;
cov_2ic6k9gh7t.b[31][1]++;
var separator = (cov_2ic6k9gh7t.s[91]++, ',\n' + indent);
cov_2ic6k9gh7t.s[92]++;
properties = partial.join(separator);
cov_2ic6k9gh7t.s[93]++;
final = '{\n' + indent + properties + ',\n' + stepback + '}';

@@ -270,4 +3358,7 @@ }

cov_2ic6k9gh7t.s[94]++;
stack.pop();
cov_2ic6k9gh7t.s[95]++;
indent = stepback;
cov_2ic6k9gh7t.s[96]++;
return final;

@@ -277,13 +3368,30 @@ }

function serializeKey(key) {
var firstChar = String.fromCodePoint(key.codePointAt(0));
cov_2ic6k9gh7t.f[5]++;
var firstChar = (cov_2ic6k9gh7t.s[97]++, String.fromCodePoint(key.codePointAt(0)));
cov_2ic6k9gh7t.s[98]++;
if (!util.isIdStartChar(firstChar)) {
cov_2ic6k9gh7t.b[32][0]++;
cov_2ic6k9gh7t.s[99]++;
return quoteString(key, true);
} else {
cov_2ic6k9gh7t.b[32][1]++;
}
cov_2ic6k9gh7t.s[100]++;
for (var i = firstChar.length; i < key.length; i++) {
cov_2ic6k9gh7t.s[101]++;
if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {
cov_2ic6k9gh7t.b[33][0]++;
cov_2ic6k9gh7t.s[102]++;
return quoteString(key, true);
} else {
cov_2ic6k9gh7t.b[33][1]++;
}
}
cov_2ic6k9gh7t.s[103]++;
return key;

@@ -293,27 +3401,52 @@ }

function serializeArray(value) {
cov_2ic6k9gh7t.f[6]++;
cov_2ic6k9gh7t.s[104]++;
if (stack.indexOf(value) >= 0) {
cov_2ic6k9gh7t.b[34][0]++;
cov_2ic6k9gh7t.s[105]++;
throw TypeError('Converting circular structure to JSONext');
} else {
cov_2ic6k9gh7t.b[34][1]++;
}
cov_2ic6k9gh7t.s[106]++;
stack.push(value);
var stepback = indent;
var stepback = (cov_2ic6k9gh7t.s[107]++, indent);
cov_2ic6k9gh7t.s[108]++;
indent = indent + gap;
var partial = [];
var partial = (cov_2ic6k9gh7t.s[109]++, []);
cov_2ic6k9gh7t.s[110]++;
for (var i = 0; i < value.length; i++) {
var propertyString = serializeProperty(String(i), value);
partial.push(propertyString !== undefined ? propertyString : 'null');
var propertyString = (cov_2ic6k9gh7t.s[111]++, serializeProperty(String(i), value));
cov_2ic6k9gh7t.s[112]++;
partial.push(propertyString !== undefined ? (cov_2ic6k9gh7t.b[35][0]++, propertyString) : (cov_2ic6k9gh7t.b[35][1]++, 'null'));
}
var final = void 0;
cov_2ic6k9gh7t.s[113]++;
if (partial.length === 0) {
cov_2ic6k9gh7t.b[36][0]++;
cov_2ic6k9gh7t.s[114]++;
final = '[]';
} else {
cov_2ic6k9gh7t.b[36][1]++;
cov_2ic6k9gh7t.s[115]++;
if (gap === '') {
var properties = partial.join(',');
cov_2ic6k9gh7t.b[37][0]++;
var properties = (cov_2ic6k9gh7t.s[116]++, partial.join(','));
cov_2ic6k9gh7t.s[117]++;
final = '[' + properties + ']';
} else {
var separator = ',\n' + indent;
var _properties = partial.join(separator);
cov_2ic6k9gh7t.b[37][1]++;
var separator = (cov_2ic6k9gh7t.s[118]++, ',\n' + indent);
var _properties = (cov_2ic6k9gh7t.s[119]++, partial.join(separator));
cov_2ic6k9gh7t.s[120]++;
final = '[\n' + indent + _properties + ',\n' + stepback + ']';

@@ -323,7 +3456,11 @@ }

cov_2ic6k9gh7t.s[121]++;
stack.pop();
cov_2ic6k9gh7t.s[122]++;
indent = stepback;
cov_2ic6k9gh7t.s[123]++;
return final;
}
cov_2ic6k9gh7t.s[124]++;
module.exports = stringify;
'use strict';
var unicode = require('../lib/unicode');
var cov_1dnoicbq16 = function () {
var path = 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\util.js',
hash = '13c941b1fd777c5dedfab2c25e87125bb4b947d0',
global = new Function('return this')(),
gcv = '__coverage__',
coverageData = {
path: 'D:\\Users\\Jordan\\Desktop\\jsonext\\src\\util.js',
statementMap: {
'0': {
start: {
line: 1,
column: 16
},
end: {
line: 1,
column: 41
}
},
'1': {
start: {
line: 3,
column: 0
},
end: {
line: 31,
column: 1
}
},
'2': {
start: {
line: 5,
column: 2
},
end: {
line: 5,
column: 40
}
},
'3': {
start: {
line: 9,
column: 2
},
end: {
line: 12,
column: 26
}
},
'4': {
start: {
line: 16,
column: 2
},
end: {
line: 21,
column: 29
}
},
'5': {
start: {
line: 25,
column: 2
},
end: {
line: 25,
column: 24
}
},
'6': {
start: {
line: 29,
column: 2
},
end: {
line: 29,
column: 30
}
}
},
fnMap: {},
branchMap: {
'0': {
loc: {
start: {
line: 9,
column: 9
},
end: {
line: 12,
column: 26
}
},
type: 'binary-expr',
locations: [{
start: {
line: 9,
column: 10
},
end: {
line: 9,
column: 18
}
}, {
start: {
line: 9,
column: 22
},
end: {
line: 9,
column: 30
}
}, {
start: {
line: 10,
column: 3
},
end: {
line: 10,
column: 11
}
}, {
start: {
line: 10,
column: 15
},
end: {
line: 10,
column: 23
}
}, {
start: {
line: 11,
column: 3
},
end: {
line: 11,
column: 12
}
}, {
start: {
line: 11,
column: 18
},
end: {
line: 11,
column: 27
}
}, {
start: {
line: 12,
column: 2
},
end: {
line: 12,
column: 26
}
}],
line: 9
},
'1': {
loc: {
start: {
line: 16,
column: 9
},
end: {
line: 21,
column: 29
}
},
type: 'binary-expr',
locations: [{
start: {
line: 16,
column: 10
},
end: {
line: 16,
column: 18
}
}, {
start: {
line: 16,
column: 22
},
end: {
line: 16,
column: 30
}
}, {
start: {
line: 17,
column: 3
},
end: {
line: 17,
column: 11
}
}, {
start: {
line: 17,
column: 15
},
end: {
line: 17,
column: 23
}
}, {
start: {
line: 18,
column: 3
},
end: {
line: 18,
column: 11
}
}, {
start: {
line: 18,
column: 15
},
end: {
line: 18,
column: 23
}
}, {
start: {
line: 19,
column: 3
},
end: {
line: 19,
column: 12
}
}, {
start: {
line: 19,
column: 18
},
end: {
line: 19,
column: 27
}
}, {
start: {
line: 20,
column: 3
},
end: {
line: 20,
column: 17
}
}, {
start: {
line: 20,
column: 23
},
end: {
line: 20,
column: 37
}
}, {
start: {
line: 21,
column: 2
},
end: {
line: 21,
column: 29
}
}],
line: 16
}
},
s: {
'0': 0,
'1': 0,
'2': 0,
'3': 0,
'4': 0,
'5': 0,
'6': 0
},
f: {},
b: {
'0': [0, 0, 0, 0, 0, 0, 0],
'1': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
},
_coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c'
},
coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
coverageData.hash = hash;
return coverage[path] = coverageData;
}();
var unicode = (cov_1dnoicbq16.s[0]++, require('../lib/unicode'));
cov_1dnoicbq16.s[1]++;
module.exports = {
isSpaceSeparator: function isSpaceSeparator(c) {
cov_1dnoicbq16.s[2]++;
return unicode.Space_Separator.test(c);
},
isIdStartChar: function isIdStartChar(c) {
return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c === '$' || c === '_' || unicode.ID_Start.test(c);
cov_1dnoicbq16.s[3]++;
return (cov_1dnoicbq16.b[0][0]++, c >= 'a') && (cov_1dnoicbq16.b[0][1]++, c <= 'z') || (cov_1dnoicbq16.b[0][2]++, c >= 'A') && (cov_1dnoicbq16.b[0][3]++, c <= 'Z') || (cov_1dnoicbq16.b[0][4]++, c === '$') || (cov_1dnoicbq16.b[0][5]++, c === '_') || (cov_1dnoicbq16.b[0][6]++, unicode.ID_Start.test(c));
},
isIdContinueChar: function isIdContinueChar(c) {
return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c === '$' || c === '_' || c === '\u200C' || c === '\u200D' || unicode.ID_Continue.test(c);
cov_1dnoicbq16.s[4]++;
return (cov_1dnoicbq16.b[1][0]++, c >= 'a') && (cov_1dnoicbq16.b[1][1]++, c <= 'z') || (cov_1dnoicbq16.b[1][2]++, c >= 'A') && (cov_1dnoicbq16.b[1][3]++, c <= 'Z') || (cov_1dnoicbq16.b[1][4]++, c >= '0') && (cov_1dnoicbq16.b[1][5]++, c <= '9') || (cov_1dnoicbq16.b[1][6]++, c === '$') || (cov_1dnoicbq16.b[1][7]++, c === '_') || (cov_1dnoicbq16.b[1][8]++, c === '\u200C') || (cov_1dnoicbq16.b[1][9]++, c === '\u200D') || (cov_1dnoicbq16.b[1][10]++, unicode.ID_Continue.test(c));
},
isDigit: function isDigit(c) {
cov_1dnoicbq16.s[5]++;
return (/[0-9]/.test(c)

@@ -20,2 +329,4 @@ );

isHexDigit: function isHexDigit(c) {
cov_1dnoicbq16.s[6]++;
return (/[0-9A-Fa-f]/.test(c)

@@ -22,0 +333,0 @@ );

5

package.json
{
"name": "jsonext",
"version": "1.0.0",
"version": "1.0.1",
"description": "An extension of JSON that supports the Next gen features",

@@ -11,3 +11,4 @@ "main": "lib/",

"scripts": {
"prepublish": "npm run build",
"prepublishOnly": "npm run lint && npm test",
"preversion": "npm run lint && npm test",
"build": "node build.js",

@@ -14,0 +15,0 @@ "lint": "eslint --fix build.js src/",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc