UNPKG

typedux

Version:

Slightly adjusted Redux (awesome by default) for TS

47 lines 1.25 kB
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isArray = exports.isPromise = exports.isString = exports.isFunction = void 0; /** * Is a given value a function * * @param o * @returns {boolean} */ function isFunction(o) { return typeof o === 'function'; } exports.isFunction = isFunction; /** * is string * * @param o * @returns {boolean} */ function isString(o) { return typeof o === 'string'; } exports.isString = isString; function isPromise(o) { return o instanceof Promise || (o && isFunction(o.then)); } exports.isPromise = isPromise; /** * Is array type guard * * @param o */ function isArray(o) { return Array.isArray(o); } exports.isArray = isArray; }); //# sourceMappingURL=Guards.js.map