Buscar

dan schmidt jquery utility functions type testing

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

jQuery Utility Functions: Type Testing Cheat Sheet
by dan_schmidt via cheatography.com/837/cs/389/
Use Cases
Dete ​rmine the type of an object
Allow for optional parameters & valida ​tion
Functions
$.is ​Arr ​ay( ​arr ​ay) => returns true if array
$.is ​Fun ​cti ​on( ​fun ​cti ​on) => return true if
function
$.is ​Emp ​tyO ​bje ​ct( ​obj ​ect) => return true is
simple, empty object
$.is ​Pla ​inO ​bje ​ct( ​obj ​ect) => return true if
object was created with {} or 'new' keyword
$.is ​Xml ​Doc ​(doc) => return true if xml
document or node within xml document*
$.is ​Num ​eri ​c(n ​umb ​er) => return true if number
$.is ​Win ​dow ​(wi ​ndow) return true if window or
frame
$.ty ​pe( ​obj ​ect) => returns type of object as
string
 
type() Function Return Values
boolean
https: ​//d ​eve ​lop ​er.m ​oz ​ill ​a.o ​rg/ ​en/ ​Jav ​aSc ​rip ​t/R ​ef
e ​ren ​ce/ ​Glo ​bal ​_Ob ​jec ​ts/ ​Boolean
number
string
function
array
date
regexp
object
undefined
null
 
By dan_schmidt
cheatography.com/dan-schmidt/ 
Published 25th May, 2012.
Last updated 25th May, 2012.
Page 1 of 1.
 
Sponsored by Readability-Score.com
Measure your website readability!
https://readability-score.com
	jQuery Utility Functions: Type Testing Cheat Sheet - Page 1
	Use Cases
	type() Function Return Values
	Functions

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais