aws-sdk-js-codemod
Version:
Collection of codemod scripts that help update AWS SDK for JavaScript APIs
19 lines (18 loc) • 629 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isS3UploadApiUsed = void 0;
const isS3UploadApiUsed = (j, source, clientIdentifiers) => {
for (const clientId of clientIdentifiers) {
const s3UploadCallExpressions = source.find(j.CallExpression, {
callee: {
type: "MemberExpression",
object: clientId,
property: { type: "Identifier", name: "upload" },
},
});
if (s3UploadCallExpressions.length)
return true;
}
return false;
};
exports.isS3UploadApiUsed = isS3UploadApiUsed;