pacote-install
Version:
A tool to download npm packages from specific registries
17 lines (16 loc) • 506 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.jsonParse = jsonParse;
const logger_1 = __importDefault(require("./logger"));
function jsonParse(json) {
try {
return JSON.parse(json);
}
catch (error) {
logger_1.default.error('parse json error', json, 'with error', error);
throw error;
}
}