TypeTagsString Representations of Node.js Built-in Objects
  • Introduction
    • Overview
    • .assign(...)
    • .get(...)
    • .enhance(...)
    • .has(...)
    • .of(...)
    • Overview
    • .isDefault(...)
    • .isIterator(...)
    • .isTypedArray(...)
    • Overview
    • AbortController
    • AbortSignal
    • AggregateError
    • Arguments
    • Array
    • ArrayIterator
    • ArrayBuffer
    • AsyncFunction
    • AsyncGenerator
    • AsyncGenFn
    • Atomics
    • BigInt
    • BigInt64Array
    • BigUint64Array
    • Boolean
    • Console
    • DataView
    • Date
    • Generator
    • GeneratorFunction
    • Error
    • EvalError
    • FinalizationRegistry
    • Float32Array
    • Float64Array
    • Function
    • GlobalThis
    • Global
    • Infinity
    • Int8Array
    • Int16Array
    • Int32Array
    • Intl
    • IntlCollator
    • IntlDateTimeFormat
    • IntlListFormat
    • IntlLocale
    • IntlNumberFormat
    • IntlPluralRules
    • IntlRelativeTimeFormat
    • JSON
    • Map
    • MapIterator
    • Math
    • NaN
    • Number
    • Object
    • Process
    • Promise
    • RangeError
    • ReferenceError
    • RegExp
    • Reflect
    • Set
    • SetIterator
    • SharedArrayBuffer
    • String
    • StringIterator
    • Symbol
    • SyntaxError
    • TextDecoder
    • TextEncoder
    • TypeError
    • Uint8Array
    • Uint8ClampedArray
    • Uint16Array
    • Uint32Array
    • Undefined
    • URIError
    • URL
    • URLSearchParams
    • WeakMap
    • WeakRef
    • WeakSet
    • WebAssembly
    • WasmCompileError
    • WasmGlobal
    • WasmInstance
    • WasmLinkError
    • WasmMemory
    • WasmModule
    • WasmRuntimeError
    • WasmTable
  • TType
  • Introduction
    • Overview
    • .assign(...)
    • .get(...)
    • .enhance(...)
    • .has(...)
    • .of(...)
    • Overview
    • .isDefault(...)
    • .isIterator(...)
    • .isTypedArray(...)
    • Overview
    • AbortController
    • AbortSignal
    • AggregateError
    • Arguments
    • Array
    • ArrayIterator
    • ArrayBuffer
    • AsyncFunction
    • AsyncGenerator
    • AsyncGenFn
    • Atomics
    • BigInt
    • BigInt64Array
    • BigUint64Array
    • Boolean
    • Console
    • DataView
    • Date
    • Generator
    • GeneratorFunction
    • Error
    • EvalError
    • FinalizationRegistry
    • Float32Array
    • Float64Array
    • Function
    • GlobalThis
    • Global
    • Infinity
    • Int8Array
    • Int16Array
    • Int32Array
    • Intl
    • IntlCollator
    • IntlDateTimeFormat
    • IntlListFormat
    • IntlLocale
    • IntlNumberFormat
    • IntlPluralRules
    • IntlRelativeTimeFormat
    • JSON
    • Map
    • MapIterator
    • Math
    • NaN
    • Number
    • Object
    • Process
    • Promise
    • RangeError
    • ReferenceError
    • RegExp
    • Reflect
    • Set
    • SetIterator
    • SharedArrayBuffer
    • String
    • StringIterator
    • Symbol
    • SyntaxError
    • TextDecoder
    • TextEncoder
    • TypeError
    • Uint8Array
    • Uint8ClampedArray
    • Uint16Array
    • Uint32Array
    • Undefined
    • URIError
    • URL
    • URLSearchParams
    • WeakMap
    • WeakRef
    • WeakSet
    • WebAssembly
    • WasmCompileError
    • WasmGlobal
    • WasmInstance
    • WasmLinkError
    • WasmMemory
    • WasmModule
    • WasmRuntimeError
    • WasmTable
  • TType

TypeTags .isDefault

Overview#

The .isDefault method allow us to check if an object's toStringTag value is one of the native built-in type tags.

Usage#

TypeTags.isDefault(value)#
  • Checks if value has a default type tag.
import { TypeTags } from 'typetags'
TypeTags.isDefault('[object Function]')
// → true
TypeTags.isDefault('[object Bazzinga]')
// → false

Signature#

isDefaulTag(tag: string): boolean
Overview
.isIterator(...)

© 2021 Moa Torres
Edit this page on GitHub