UNPKG

msw

Version:

Seamless REST/GraphQL API mocking library for browser and Node.js.

14 lines 432 B
import { isObject } from './isObject.mjs'; function hasRefCounted(value) { return ( /** * @note Guard against non-object values. * E.g. `setTimeout` returns an object in Node.js but a number in the browser. */ isObject(value) && typeof Reflect.get(value, "ref") === "function" && typeof Reflect.get(value, "unref") === "function" ); } export { hasRefCounted }; //# sourceMappingURL=hasRefCounted.mjs.map