UNPKG

rambda

Version:

Lightweight and faster alternative to Ramda with included TS definitions

9 lines (7 loc) 212 B
export function is(targetPrototype, x){ if (arguments.length === 1) return _x => is(targetPrototype, _x) return ( x != null && x.constructor === targetPrototype || x instanceof targetPrototype ) }