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
//## Moment.JS Holiday Plugin | |
// | |
//Usage: | |
// Call .holiday() from any moment object. If date is a US Federal Holiday, name of the holiday will be returned. | |
// Otherwise, return nothing. | |
// | |
// Example: | |
// `moment('12/25/2013').holiday()` will return "Christmas Day" | |
// | |
//Holidays: |
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
import request from 'request'; | |
const myRequests = { | |
get: (...args) => request.get(...args), | |
post: (...args) => request.post(...args), | |
patch: (...args) => request.patch(...args), | |
delete: (...args) => request.delete(...args), | |
put: (...args) => request.put(...args), | |
}; |
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
import fetch from 'cross-fetch'; | |
import _ from 'lodash'; | |
const myRequests = { | |
get: (...args) => { | |
const urlOrOptions = args[0]; | |
const cb = args[1]; | |
let url; | |
let options; |
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
import request from "request"; | |
const myCoolFunction = (search, cb) => { | |
console.log(`Preparing to search for ${search}`); | |
request(`https://google.com/search/q=${search}`, cb); | |
} | |
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
import wrapper from "./wrappers/request.js"; | |
const myCoolFunction = (search, cb) => { | |
console.log(`Preparing to search for ${search}`); | |
wrapper(`https://google.com/search/q=${search}`, cb); | |
} | |