Package Exports
- signnow-promise
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (signnow-promise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
signnow-promise
Converts signnow node sdk callback pattern to return promises.
signnow vs signnow-promise
signnow
signnow.user.create({
first_name: 'John',
last_name: 'Wayne',
email:'john@domain.com',
password:'yourpwd'
}, function(err, res) {
if (!err) {
console.log(`RESULTS: ${res}`);
} else {
console.log(`ERROR: ${err}`);
}
});signnow-promise
async/await
try {
const res = await signnow.user.create({
first_name: 'John',
last_name: 'Wayne',
email:'john@domain.com',
password:'yourpwd'
});
console.log(`RESULTS: ${res}`);
} catch (err) {
console.log(`ERROR: ${err}`);
}then/catch
signnow.user.create({
first_name: 'John',
last_name: 'Wayne',
email:'john@domain.com',
password:'yourpwd'
}).then(res => {
console.log(`RESULTS: ${res}`);
}).catch(err => {
console.log(`ERROR: ${err}`);
});Install
npm install signnow-promise
Usage
const signnow = require('signnow-promise')({
credentials: 'ENCODED_CLIENT_CREDENTIALS',
production: false
});To see full usage documentation, see the README.md for signnow.