function promisify(fn) {
  return new Promise(function (resolve, reject) {
    fn(function (err, value) {
      if (err) reject(err);else resolve(value);
    });
  });
}
function promisify(fn) {
  return new Promise(function (resolve, reject) {
    fn(function (err, value) {
      if (err) reject(err);else resolve(value);
    });
  });
}
function promisify ( fn ) { return new Promise ( function ( resolve , reject ) { fn ( function ( err , value ) { if ( err ) reject ( err ) ; else resolve ( value ) ; } ) ; } ) ; }
Simple promisify
Simple promisify