An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.
A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.
The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links.
URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.
Tests if the value passed is of type Number, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isNumber(1);//trueThing.isNumber('nope');//false
isString()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type String, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isString('yes');//trueThing.isString(1);//false
isBoolean()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type Boolean, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isBoolean(true);//trueThing.isBoolean(1);//false
isArray()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type Array, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isArray([]);//trueThing.isArray(1);//false
isObject()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type Object, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isObject({});//trueThing.isObject([1,2,3]);//trueThing.isObject(1);//false
isPlainObject()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type PlainObject, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isPlainObject({'one' : 'two'});//trueThing.isPlainObject([1,2,3]);//falseThing.isPlainObject(1);//false
isNull()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type Null, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isNull(null);//trueThing.isNull([1,2,3]);//falseThing.isNull(1);//false
isEmpty()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is of type Empty, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isEmpty([]);//trueThing.isEmpty([1,2,3]);//falseThing.isEmpty(1);//false
isValidJSONInput()
Parameter
Returns
Description
Any
Boolean
Tests if the value passed is valid JSON, and returns true if it is, false otherwise.
Example:
//Checks if the passed value is of type numberThing.isValidJSONInput({'one':'two'});//trueThing.isValidJSONInput([1,2,3]);//falseThing.isValidJSONInput(1);//false
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.