UNPKG

js-slang

Version:

Javascript-based implementations of Source, written in Typescript

16 lines 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isSourceModule = exports.mergeImportOptions = void 0; const _ = require("lodash"); const analyzer_1 = require("./preprocessor/analyzer"); function mergeImportOptions(src) { const baseOptions = _.cloneDeep(analyzer_1.defaultAnalysisOptions); return _.merge(baseOptions, src); } exports.mergeImportOptions = mergeImportOptions; /** * Checks if the given string refers to a Source module instead of a local module */ const isSourceModule = (path) => !path.startsWith('.') && !path.startsWith('/'); exports.isSourceModule = isSourceModule; //# sourceMappingURL=utils.js.map