Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const doSomething = (uniqueThing) => {
if (doSomething.currentRequest[uniqueThing]) {
return doSomething.currentRequest[uniqueThing]
return doSomething.currentRequest[uniqueThing] = require(url, params)
response => {
delete doSomething.currentRequest
return response
error => {
delete doSomething.currentRequest
throw error
doSomething.cache = {}

This comment has been minimized.

Copy link

daschi commented Oct 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.