Class: CUI.util

Defined in: base/util.coffee

Variables Summary

getObjectClassRegexp =
/^function\s*(\w+)/

Class Method Summary

Class Method Details

. (void) assert(condition, caller, message, debug_output)

. (void) assertImplements(inst, methods)

. (void) assertInstanceOf(variableName, classClass, opts, value = void 0)

. (void) $elementIsInDOM($el)

. (void) getCoordinatesFromEvent(ev)

for our self repeating mousemove event we track a scrollPageX and scrollPageY offset from our own dragscroller

. (void) elementGetPosition(coordinates, el)

return the difference of the absolute position of coordinates and element

. (void) getObjectClass(obj)

Returns the class name of the argument or undefined if it's not a valid JavaScript object.

. (void) isUndef(obj)

. (void) isNull(obj)

. (void) isString(obj)

. (void) isEmpty(obj)

. (void) isTrue(obj)

. (void) isFalse(obj)

. (void) isBoolean(obj)

. (void) isElement(obj)

. (void) isPosInt(obj)

. (void) isContent(obj)

. (void) isNumber(n)

. (void) isFloat(n)

. (void) isInteger(n)

. (void) isPromise(n)

. (void) isDeferred(n)

. (void) escapeRegExp(str)

. (void) getIntOrString(s)

. (void) getInt(s, ret_as_is = false)

. (void) getFloat(s)

. (void) xor(a, b)

. (void) toHtml(data, space2nbsp)

. (void) copyObject(obj, deep = false, level = 0)

. (void) dump(obj, space = "\t")

. (void) alert_dump(v)

. (void) toDash(s)

convert camel case to dash

. (void) toClass(s)

convert to class compatible string

. (void) toDot(s)

convert to class compatible string

. (void) toCamel(s, includeFirst = false)

convert dash to camel

. (void) removeFromArray(value, arr, compFunc)

remove all occurrances of value from array returns the number of items removed

. (void) moveInArray(from, to, arr, after = false)

. (void) compareIndex(a_idx, b_idx)

use in sort

. (void) pushOntoArray(value, arr, compFunc)

pushes value onto array, if not exists returns index of the pushed value

. (void) idxInArray(value, arr, compFunc)

. (void) findInArray(value, arr, compFunc)

. (void) utoa(str)

ucs-2 string to base64 encoded ascii

. (void) atou(str)

base64 encoded ascii to ucs-2 string

. (void) parseCoordinates(coordinates)

coordinates is a string, almost every coordinates format is accepted. Returns an object with lat and lng attributes, or false if wasn't possible to parse or if coordinates is null.

. (void) formatCoordinates(coordinates, format)

coordinates is a PlainObject with lat and lng attributes, format is a string which indicates what format will be used. It is possible that format be a function, and it is invoked with coordinates as parameter. Returns a string formatted.

. (void) isArray(v)

. (void) inArray(value, array)

. (void) isEqual(x, y)

. (void) isMap(v)

. (void) isFunction(v)

. (void) isPlainObject(v)

. (void) isEmptyObject(v)

. (void) revertMap(map)

. (void) stringMapReplace(s, map)

. (void) mergeMap(targetMap, mergeMap)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: