smartystreets-javascript-sdk
Version:
Quick and easy Smarty address validation.
2 lines (1 loc) • 517 B
JavaScript
;var e,r,s=require("./Errors.cjs"),t=require("./SharedCredentials.cjs");exports.__require=function(){if(r)return e;r=1;const n=s.__require().UnprocessableEntityError,i=t.__require();return e=class{constructor(e,r){this.signer=r,this.sender=e}send(e){if(e.payload&&this.signer instanceof i){throw new n("Shared credentials cannot be used in batches with a length greater than 1 or when using the US Extract API.")}return new Promise(((r,s)=>{this.signer.sign(e),this.sender.send(e).then(r).catch(s)}))}}};