UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

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 ) }