GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Selectize
  • Get Started
  • Examples
  • API Documentation
  • Community
  • GitHub
  • Guides
  • constants
  • selectize
  • highlight
  • utils
  • microevent
  • microplugin
  • sifter

This view

  • Original page
  • New address

GeezerVison is showing selectize.dev — utils | Selectize

API Documentation for utils

isArray ⇒ Boolean​

This is a polyfill for the Array.isArray function. Determines whether the passed obect is an Array.

Kind: global variable
Returns: Boolean - returns true if the passed object is an Array.

ParamType
vArgobject

isset(object) ⇒ boolean​

Determines if the provided value has been defined.

Kind: global function

ParamType
objectmixed

hash_key(value) ⇒ string | null​

Converts a scalar to its best string representation for hash keys and HTML attribute values.

Transformations: 'str' -> 'str' null -> '' undefined -> '' true -> '1' false -> '0' 0 -> '0' 1 -> '1'

Kind: global function

ParamType
valuestring

escape_html(str) ⇒ string​

Escapes a string for use within HTML.

Kind: global function

ParamType
strstring

escape_replace(str) ⇒ string​

Escapes "$" characters in replacement strings.

Kind: global function

ParamType
strstring

once(fn) ⇒ function​

Wraps fn so that it can only be invoked once.

Kind: global function

ParamType
fnfunction

debounce(fn, delay) ⇒ function​

Wraps fn so that it can only be called once every delay milliseconds (invoked on the falling edge).

Kind: global function

ParamType
fnfunction
delaynumber

debounce_events(self, types, fn)​

Debounce all fired events types listed in types while executing the provided fn.

Kind: global function

ParamType
selfobject
typesarray
fnfunction

watchChildEvent($parent, event, selector, fn)​

A workaround for http://bugs.jquery.com/ticket/6696

Kind: global function

ParamTypeDescription
$parentobjectParent element to listen on.
eventstringEvent name.
selectorstringDescendant selector to filter by.
fnfunctionEvent handler.

getInputSelection(input) ⇒ object​

Determines the current selection within a text input control. Returns an object containing:

  • start
  • length

Kind: global function

ParamType
inputobject

transferStyles($from, $to, properties)​

Copies CSS properties from one element to another.

Kind: global function

ParamType
$fromobject
$toobject
propertiesarray

measureString(str, $parent) ⇒ number​

Measures the width of a string within a parent element (in pixels).

Kind: global function

ParamType
strstring
$parentobject

autoGrow($input)​

Sets up an input to grow horizontally as the user types. If the value is changed manually, you can trigger the "update" handler to resize:

$input.trigger('update');

Kind: global function

ParamType
$inputobject

isJSON(data) ⇒ Boolean​

Determines whether or not the data argument is a valid JSON string.

Kind: global function
Returns: Boolean - true if is an JSON object

ParamTypeDescription
dataStringData to test

uaDetect(platform, re) ⇒ Boolean​

If the browser supports the User-Agent Client Hint, then return the platform name, otherwise return the result of a regular expression test on the user agent string

Kind: global function
Returns: Boolean - A boolean value.

ParamDescription
platformThe platform you want to detect.
reA regular expression that matches the user agent string.
  • isArray ⇒ Boolean
  • isset(object) ⇒ boolean
  • hash_key(value) ⇒ string | null
  • escape_html(str) ⇒ string
  • escape_replace(str) ⇒ string
  • once(fn) ⇒ function
  • debounce(fn, delay) ⇒ function
  • debounce_events(self, types, fn)
  • watchChildEvent($parent, event, selector, fn)
  • getInputSelection(input) ⇒ object
  • transferStyles($from, $to, properties)
  • measureString(str, $parent) ⇒ number
  • autoGrow($input)
  • isJSON(data) ⇒ Boolean
  • uaDetect(platform, re) ⇒ Boolean
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.