-
Notifications
You must be signed in to change notification settings - Fork 4
V.5. Functions
Note: Functions that are used internally are not described here.
Returns true if mimeType is one of MIME-types for an audio (starts with audio/). Otherwise returns false.
Returns true if mimeType is one of MIME-types for an image (starts with image/). Otherwise returns false.
Returns true if mimeType is one of MIME-types for a video (starts with video/). Otherwise returns false.
Returns a cookie with the name name. If the cookie with this name does not exists, returns defValue (if specified), or undefined. The cookie is returned as a string (as it is stored by the browser).
Stored a cookie with name name and value value as a string. If options contains the expires property, the property is converted from a Date object to a string. See this article for details.
Deletes a cookie with the name name.
Returns the value stored in localStorage under the key key. If there is no such value, defValue is returned, if specified, otherwise undefined is returned. All errors thrown are catched, you do not need to catch them manually. Note: JSON.parse() is applied to the value before it is returned.
Stores value in localStorage under key key. Returns true on success, otherwise returns false. All errors thrown are catched, you do not need to catch them manually. Note: JSON.stringify() is applied to the value before it is stored.
Removes the value stored in localStorage under key key. Returns true on success, otherwise returns false. All errors thrown are catched, you do not need to catch them manually.
Returns the value stored in sessionStorage under the key key. If there is no such value, defValue is returned, if specified, otherwise undefined is returned. All errors thrown are catched, you do not need to catch them manually. Note: JSON.parse() is applied to the value before it is returned.
Stores value in sessionStorage under key key. Returns true on success, otherwise returns false. All errors thrown are catched, you do not need to catch them manually. Note: JSON.stringify() is applied to the value before it is stored.
Removes the value stored in sessionStorage under key key. Returns true on success, otherwise returns false. All errors thrown are catched, you do not need to catch them manually.
Returns true if the array arr contains the value val. Otherwise returns false. If strict casts to boolean true, the comparison is strict (===), otherwise it is not strict (==).
Creates an array from the array-like object obj. Returns the array. obj properties must be numeric, and it must have the length property.
Returns true if the object obj has at least one own property (Object.prototype.hasOwnProperties() method is used to perform the chech). Otherwise returns false.
Applies the function f to each key-value pair of the object obj, the value being the first argument, and the key being the second one.
Creates an array from the object obj by applying the function f to each key-value pair of the object obj, the value being the first argument, and the key being the second one. The array is populated by the results of the function applications. Returns the array.
Creates a new object from the object obj by applying the function f to each key-value pair of the object obj, the value being the first argument, and the key being the second one. The new object is populated by those key-value pairs only, for which the function f returns a value which casts to boolean true. Returns the new object. Warning: Pay attention to that this function creates an object, unlike other functions from this group.
Creates an array from the valuye of the object obj. Returns the array.