Skip to content

Instantly share code, notes, and snippets.

View definitelycarter's full-sized avatar
😀
living the dream

Adam Carter definitelycarter

😀
living the dream
  • Tampa, Florida
  • 13:50 (UTC -05:00)
View GitHub Profile
@definitelycarter
definitelycarter / example.js
Last active January 9, 2018 15:44
example without using promises
let getUserFromEmail = (email, cb) => {
$service.findUser({ email }, (err, user) => {
if(err) {
return cb(err);
} else if(user == null) {
return cb(new Error('The user was not found'));
}
console.log('User found');
return cb(undefined, user);
@definitelycarter
definitelycarter / example-async.js
Created November 16, 2016 17:31
Example using promises.
let getUserFromEmail = (email, cb) => {
$service.findUser({ email }, (err, user) => {
if(err) {
return cb(err);
} else if(user == null) {
return cb(new Error('The user was not found'));
}
console.log('User found');
return cb(undefined, user);
@definitelycarter
definitelycarter / keybase.md
Created September 10, 2019 15:03
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object: