UNPKG

@tamara-solution/checkout

Version:

Script will be embedded in merchant's site to checkout. The merchant's don't need to redirect to tamara's site.

24 lines (17 loc) 464 B
const toString = Object.prototype.toString function isFunction(obj) { return typeof obj === 'function' } function isObject(obj) { return typeof obj === 'object' && obj === Object(obj) } function isArray(obj) { return toString.call(obj) == '[object Array]' } function getType(variable) { if (typeof variable === 'object' && Array.isArray(variable)) { return 'array' } return typeof variable } export { getType, isFunction, isObject, isArray }