Minified API

$()

Creates a new Minified list, or register a DOMReady-handler.

list.length

Contains the number of elements in the Minified list.

$$()

Returns a DOM object containing the first match of the given selector, or undefined if no match was found.

$.getCookie()

Returns the cookie with the given name.

$.loop()

Runs an animation loop.

$.off()

Removes the given event handler.

$.parseJSON()

Parses a string containing JSON and returns the de-serialized object.

$.ready()

Registers a handler to be called as soon as the HTML has been fully loaded in the browser.

$.request()

Initiates a HTTP request to the given URL, using XMLHttpRequest.

$.setCookie()

Creates, updates or deletes a cookie.

$.toJSON()

Converts the given value into a JSON string.

$.wait()

Creates a new Promise that will be fulfilled as soon as the specified number of milliseconds have passed.

.add()

Adds the given node(s) as children to the list's HTML elements.

.addAfter()

Inserts the given text or element(s) as siblings after each HTML element in the list.

.addBefore()

Inserts the given text or element(s) as siblings in front of each HTML element in the list.

.addFront()

Adds the given node(s) as children to the list's HTML elements.

.animate()

Animates the items of the list by modifying their properties, CSS styles and attributes.

.array()

Converts a Minified list or other array-like structure into a native JavaScript array.

.call()

Calls all functions in the list.

.clone()

Clones all HTML nodes in the given list by creating a deep copy of them.

.collect()

Creates a new Minified list from the current list using the given callback function.

.contains()

Checks whether the list contains the given item.

.dial()

Creates a function allows you to set all list members to one of two states or any transitional state between them.

.each()

Invokes the given function once for each item in the list.

.endsWith()

Checks whether the list or string ends with the other string or list.

.equals()

Checks whether two values, lists or objects are equal in a deep comparison.

.fill()

Sets the content of the list's HTML elements, replacing old content.

.filter()

Creates a new Minified list by taking an existing list and omitting certain elements from it.

.find()

Finds a specific value in the list.

.findLast()

Finds the last occurrence of value in the list.

.get()

Retrieves properties, attributes and styles from the list's first element.

.hide()

Hides the elements of the list.

.ht()

Replaces the content of the list elements with the HTML generated using the given template.

.intersection()

Takes two input lists to create a new list containing only those values that exist in both input lists.

.is()

Checks whether all elements in the list match the given selector.

.join()

Converts list elements into strings and joins them into a single string, optionally separated with the given separator.

.map()

Creates a new Minified list from the current list using the given callback function.

.merge()

Takes a list of objects and copies the properties into the target object.

.next()

Finds the next sibling elements matching the given selector or filter function for each list element, and returns the results as a list.

.not()

Returns a new list that contains only those elements that do not match the given selector, callback function or have the given index.

.offset()

Returns the pixel page coordinates of the list's first element.

.on()

Registers the function as event handler for all items in the list.

.onChange()

Registers a handler to be called whenever content of the list's input fields changes.

.onClick()

Registers a function to be called for 'click' events.

.onFocus()

Registers a function to be called when a list element either gets the focus or the focus is removed (blur).

.onOver()

Registers a function to be called whenever the mouse pointer enters or leaves one of the list's elements.

.only()

Returns a new list that contains only those elements that match the given selector, match the callback function or have the given index.

.per()

Invokes the handler function for each list element with a single-element list containing only this element.

.reduce()

Reduces the list into a single value with the help of a callback function.

.remove()

Removes all elements in the list from the DOM tree.

.replace()

Replaces the list items with the the given node(s) in the DOM tree.

.reverse()

Returns a new Minified list or string with the input's elements/characters in reverse order.

.select()

Executes a selector with the list as context.

.set()

Modifies the list's elements by setting their properties, attributes, CSS styles and/or CSS classes.

.show()

Make the invisible element of the list visible.

.sort()

Sorts the list elements and returns a new, sorted list.

.startsWith()

Checks whether the list or string starts with the other string or list.

.sub()

Returns a new Minified list containing only the elements in the specified range.

.text()

Returns the concatenated text content of all nodes in the list.

.toObject()

Creates an object map from a list of keys and a single values.

.toggle()

Creates a function that switches between the two given states for the list.

.trav()

Traverses each DOM node in the list using the given property; creates a new list that includes each visited node, optionally filtered by the given selector.

.trigger()

Triggers event handlers registered with on.

.uniq()

Takes a list of values and removes all duplicates.

.unite()

Takes a list of functions as input to create a new function that calls all input functions with the same arguments.

.up()

Finds the closest parents matching the given selector or filter function for each list element, and returns the results as a list.

.values()

Creates a name/value map from the given form.

EE()

Creates a new HTML Element, wrapped in a Minified list, optionally with attributes and children.

HTML()

Creates a list of HTML nodes from the given HTML template.

M

Exposes the internal class used by all Minified lists.

MINI.getter

Exposes a map of prefix handlers used by get.

MINI.setter

Exposes a map of prefix handlers used by set.

Minified Lists

Minified lists are Array-like objects provided by Minified.

Promise

Promises are objects that represent the future result of an asynchronous operation.

_()

Creates a new Minified list.

_.bind()

Creates a new function that calls the given function bound to the given object as 'this', and optionally with the specified 'pre-filled' arguments to be appended or prepended to the arguments you all the new function with.

_.copyObj()

Copies every property of the first object into the second object.

_.dateAdd()

Adds the specified time to the given Date and returns the result as a new Date .

_.dateClone()

Creates a new Date object that represents the same time as the given date.

_.dateDiff()

Calculates the time difference between both dates, using in the unit determined by the property.

_.dateMidnight()

Returns a new Date object with the same calendar date, but at midnight in the current time zone.

_.eachObj()

Invokes the given function once for each property of the given object.

_.escapeHtml()

Escapes all reserved characters for HTML so the string can be used in text or as attribute value.

_.escapeRegExp()

Escapes all reserved characters for regular expressions by preceding them with a backslash.

_.extend()

Copies every property of the source objects into the first object.

_.filterObj()

Creates a new object that contains only those properties of the input object that have been approved by the filter function.

_.format()

Formats an object using a template.

_.formatHtml()

Formats an object using a template with HTML escaping for the output.

_.formatValue()

Formats a single value as a string, using the given format template.

_.isBool()

Checks whether the given reference is a boolean true or false.

_.isDate()

Checks whether the given object is a Date.

_.isEmpty()

Returns true if the given string or list is null, undefined or empty (zero length).

_.isFunction()

Checks whether the given object is a function.

_.isList()

Checks whether the given object resembles a list or array.

_.isNumber()

Checks whether the given reference is a number as defined by typeof.

_.isObject()

Checks whether the given reference is an object as defined by typeof.

_.isString()

Checks whether the given reference is a string as defined by typeof.

_.isValue()

Checks whether the given object is a value.

_.keys()

Creates a Minified list containing all property names of the specified object.

_.mapObj()

Creates a new object with the same properties but different values using the given callback function.

_.pad()

Converts a number into a string by 'padding' it with leading zeros until it has at least the given number of digits.

_.parseDate()

Parses the given string as Date using the given format.

_.parseNumber()

Parses the given string as number using the given format.

_.partial()

Creates a new function that calls the given function with some arguments pre-filled.

_.promise()

Creates a new Promise, optionally assimilating other promises.

_.range()

Creates a new Minified list containing an interval of numbers from start (inclusive) until end (exclusive).

_.template()

Parses a Handlebars-like template to create a reusable template function.

_.toString()

Converts the given object to a string.

_.trim()

Removes whitespace from the beginning and end of the given string and returns the result.

_.values()

Creates a Minified list containing all property values of the specified object.

define()

Defines a module that can be returned by require, in case you don't have a AMD loader.

promise.always()

Registers a callback that will always be called when the Promise's operation ended, no matter whether the operation succeeded or not.

promise.error()

Registers a callback that will be called when the operation failed.

promise.fire()

Changes the state of the promise into either fulfilled or rejected.

promise.stop()

Stops an ongoing operation, if supported.

promise.then()

Registers two callbacks that will be invoked when the Promise's asynchronous operation finished successfully (onSuccess) or an error occurred (onError).

require()

Returns a reference to a module.

How to...

Can't find something? Try this page!


Functions