This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SimplePromise { | |
static resolve(value) { | |
return new SimplePromise((resolve) => resolve(value)); | |
} | |
static reject(value) { | |
return new SimplePromise((resolve, reject) => reject(value)); | |
} | |
// fixme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var someObj = { | |
someMethod: function() { | |
this.someProp = 'huzzah!'; | |
console.log(this); | |
// this refers to someObj: | |
// { ..., someProp: 'huzzah!' } | |
someNestedFunction(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = require('./config'); | |
const fetch = require('node-fetch'); | |
const querystring = require('querystring'); | |
module.exports = { | |
get, | |
post, | |
put, | |
delete: httpDelete, // function name can't be 'delete' | |
fetchJsonWithAuth, |