aws-sdk-js-codemod
Version:
Collection of codemod scripts that help update AWS SDK for JavaScript APIs
9 lines (8 loc) • 400 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.replaceDeepImport = void 0;
const replaceDeepImport = (j, source, { fromPath, toPath }) => {
source.find(j.Literal, { value: fromPath }).replaceWith(j.literal(toPath));
source.find(j.StringLiteral, { value: fromPath }).replaceWith(j.stringLiteral(toPath));
};
exports.replaceDeepImport = replaceDeepImport;