Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function notMyFunction(a, cb) {
- if (a === 'latest') {
- cb(null, '123');
- } else {
- cb('error', null);
- }
- }
- function deploy(someVariable) {
- return new Promise((resolve, reject) => {
- notMyFunction(someVariable, resolve);
- });
- }
- deploy('latest').then((time) => {
- // I need access to 123, not null
- console.log(time)
- }, (err) => {
- console.log(err)
- })
Add Comment
Please, Sign In to add comment