ish.io.web

Web Input/Output mixin for ish.js

Source:
Author:
  • Nick Campbell
License:
  • MIT

Methods

[mixin] ish.io.web.cookie(sName, oDefaultopt, vOptionsopt) → {object|string|object|object|boolean|function|function|function}

Source:
Provides an interface to the cookie data of the passed value.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Description
sName string Value representing the cookie to retrieve.
oDefault object <optional>
Value representing if the default value of the cookie data if it hasn't been previously set.
vOptions object <optional>
Value representing the desired options:
Properties
Name Type Attributes Default Description
path boolean <optional>
"/" Value representing if the Querystring's delimiter is to be semicolons (;) rather than ampersands (&).
domain boolean <optional>
Value representing the domain the cookie is related to.
maxAge boolean <optional>
Value representing max age in milliseconds the cookie is to be valid for.
Returns:
Name Type Description
interface object Value representing the following properties:
Properties
Name Type Description
name string Value representing the cookie's name.
original object Value representing the cookie's original data.
data object Value representing the cookie's data.
isNew boolean Value representing if the cookie wasn't previously present in the browser's collection.
stringify function Returns a value representing the cookie data as JSON; stringify().
set function Sets the cookie into the browser's collection; set().
rm function Removes the cookie from the browser's collection; rm().

[mixin] ish.io.web.queryString.parse(sUrlopt) → {object}

Source:
See:
Parses the passed value into a Javascript object representing the Querystring data.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Note: Supports up to 3-dimensions: key=val1;key=val2;newkey=val3;obj=zero;obj=one;obj[one]=1;obj[two]=2;obj[Length]=long;obj[2]=mytwo;obj=two;obj[2]=myothertwo;obj=three
Parameters:
Name Type Attributes Default Description
sUrl string <optional>
location.search Value representing the Querystring data to parse.
Returns:
Type Description
object Value representing the Querystring data.

[mixin] ish.io.web.queryString.stringify(oData, vOptionsopt) → {string}

Source:
Converts the passed value to a Querystring.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Parameters:
Name Type Attributes Description
oData object Value representing the data to serialize into a Querystring.
vOptions object <optional>
Value representing the desired options:
Properties
Name Type Attributes Default Description
useSemicolon boolean <optional>
false Value representing if the Querystring's delimiter is to be semicolons (;) rather than ampersands (&).
encodeURI boolean <optional>
true Value representing if encodeURIComponent is to be used.
Returns:
Type Description
string Value representing the Querystring data.

[mixin] ish.io.web.storage.clear(bSessionopt)

Source:
Clears the browser's window.*Storage data.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Client-Side Only: This functionality is only available under a browser (Firefox, Chrome, etc.).
Parameters:
Name Type Attributes Default Description
bSession boolean <optional>
false Value representing if the passed value is to be cleared from the browser's window.sessionStorage data rather than window.localStorage.

[mixin] ish.io.web.storage.rm(sKey, bSessionopt)

Source:
Removes the passed value from the browser's window.*Storage data.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Client-Side Only: This functionality is only available under a browser (Firefox, Chrome, etc.).
Parameters:
Name Type Attributes Default Description
sKey string Value representing the key to remove.
bSession boolean <optional>
false Value representing if the passed value is to be removed from the browser's window.sessionStorage data rather than window.localStorage.

[mixin] ish.io.web.storage.set(sKey, vValue, bSessionopt)

Source:
Sets the passed value into the browser's window.*Storage data.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Client-Side Only: This functionality is only available under a browser (Firefox, Chrome, etc.).
Parameters:
Name Type Attributes Default Description
sKey string Value representing the key to set.
vValue variant Value representing the value to set.
bSession boolean <optional>
false Value representing if the passed value is to be set into the browser's window.sessionStorage data rather than window.localStorage.

[mixin] ish.io.web.url(sUrl) → {object}

Source:
See:
Parses the passed value into its URL components.
From Mixin: ish.io.web.js must be included for ishJS to access this functionality.
Parameters:
Name Type Description
sUrl string Value representing the URL to parse.
Returns:
Type Description
object Value representing the URL components.