VOOZH about

URL: https://quasar.dev/quasar-utils/type-checking-utils/

⇱ Type Checking Utils (<is>) | Quasar Framework


assignment_late
Why donate
travel_explore
API Explorer
build
Quasar CLI (with Vite)
Upgrade Guide
Creating a New Project
The /quasar.config File
Convert q/app-webpack Project
Browser Compatibility
TypeScript Support
Directory Structure
Commands List
CSS Preprocessors
Page Routing with VueRouter
Lazy Loading - Code Splitting
Handling Assets
Boot Files
Prefetch Feature
API Proxying
Handling Vite
Handling import.meta.env
State Management with Pinia
Lint and Format Code
Testing & Auditing
Developing Mobile Apps
Ajax Requests
Opening Dev Server To Public
build
Quasar CLI (with Webpack)
Type Checking Utils (<is>)
v2.8+

TIP

For usage with the UMD build see here.

is.deepEqual

Recursively checks if one Object is equal to another. Also supports Map, Set, ArrayBuffer, Regexp, Date, and many more.

import { is } from 'quasar'

const objA = {
 /* ... */
}
const objB = {
 /* ... */
}

console.log(is.deepEqual(objA, objB)) // true or false

is.object

import { is } from 'quasar'

const obj = { some: 'value' }
console.log(is.object(obj)) // true

is.date

import { is } from 'quasar'

const date = new Date()
console.log(is.date(date)) // true

const now = Date.now()
console.log(is.date(now)) // false

is.regexp

import { is } from 'quasar'

const pattern1 = /\w+/
console.log(is.regexp(pattern1)) // true

const pattern2 = new RegExp('\\w+')
console.log(is.regexp(pattern2)) // true

is.number

import { is } from 'quasar'

const myNumber = 80
console.log(is.number(myNumber)) // true

Caught a mistake?Edit this page in browser
1. Introduction
2. is.deepEqual
3. is.object
4. is.date
5. is.regexp
6. is.number
Copyright © 2015-present PULSARDEV SRL, Razvan Stoenescu