UNPKG

aws-sdk-js-codemod

Version:

Collection of codemod scripts that help update AWS SDK for JavaScript APIs

17 lines (16 loc) 782 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getImportSpecifiers = void 0; const getImportEqualsDeclarations_1 = require("./getImportEqualsDeclarations"); const getImportSpecifiers = (j, source, path) => { const importSpecifiers = new Set(); (0, getImportEqualsDeclarations_1.getImportEqualsDeclarations)(j, source, path).forEach((importEqualsDeclaration) => { const localName = importEqualsDeclaration.value.id.name; if (typeof localName !== "string") { throw new Error("Please report your use case on https://github.com/aws/aws-sdk-js-codemod"); } importSpecifiers.add({ localName }); }); return Array.from(importSpecifiers); }; exports.getImportSpecifiers = getImportSpecifiers;