const toString = {}.toString; const isType = (value: any, type: string): boolean => toString.call(value) === '[object ' + type + ']'; export default isType;