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