UNPKG

get-js

Version:

A lightweight library to asynchronously load scripts on the fly.

40 lines (34 loc) 691 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isArray = isArray; exports.isString = isString; exports.isFunction = isFunction; /** * Checks if the given value is an array. * * @param {*} value * @returns {boolean} */ function isArray(value) { return Object.prototype.toString.call(value) === '[object Array]'; } /** * Checks if the given value is a string. * * @param {*} value * @returns {boolean} */ function isString(value) { return typeof value === 'string'; } /** * Checks if the given value is a function. * * @param {*} value * @returns {boolean} */ function isFunction(value) { return typeof value === 'function'; }