@apidevtools/json-schema-ref-parser
Version:
Parse, Resolve, and Dereference JSON Schema $ref pointers
14 lines (12 loc) • 324 B
text/typescript
function makeNext() {
if (typeof process === "object" && typeof process.nextTick === "function") {
return process.nextTick;
} else if (typeof setImmediate === "function") {
return setImmediate;
} else {
return function next(f: () => void) {
setTimeout(f, 0);
};
}
}
export default makeNext();