Add node deps

This commit is contained in:
David Anthoff
2019-09-14 21:05:22 -07:00
parent e709e16507
commit c0c6ce37ca
6587 changed files with 1603707 additions and 921 deletions

33
node_modules/parse-json/index.js generated vendored Normal file
View File

@@ -0,0 +1,33 @@
'use strict';
const errorEx = require('error-ex');
const fallback = require('json-parse-better-errors');
const JSONError = errorEx('JSONError', {
fileName: errorEx.append('in %s')
});
module.exports = (input, reviver, filename) => {
if (typeof reviver === 'string') {
filename = reviver;
reviver = null;
}
try {
try {
return JSON.parse(input, reviver);
} catch (err) {
fallback(input, reviver);
throw err;
}
} catch (err) {
err.message = err.message.replace(/\n/g, '');
const jsonErr = new JSONError(err);
if (filename) {
jsonErr.fileName = filename;
}
throw jsonErr;
}
};