Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

91 lines (53 sloc) 2.521 kB


JavaScript predicate, comparator, equality, and utility functions

Crackle is a collection of useful JavaScript functions for both the browser and server. Specifically it focuses on collection predicate operations, such as "all or nothing" verification, and also makes working with sets of jQuery Objects easier.

Getting started


Install Crackle with NPM (Node Package Manager).

$ npm install crackle
var Crackle = require('crackle');

Web browser

Download and include crackle.min.js.

    <script src="crackle.min.js" type="text/javascript"></script>
    <script type="text/javascript" charset="utf-8">
        var values = [1, 2, 3];
        var Is =;
        if (Is(1).in(values)) {
          alert(Crackle.not(values).in([1, 2, 3, 4, 5]));


Value predicates


Return true if value self exists in an Array that.


Return true if all values in Array self satisfy Function predicate.


Return true if all values in Array self satisfy String type.


Return true if all values in Array self are instanceof Constructor.

Object predicates


Return true if key exists in Object self.


Return true if key exists for each Object in Array self.


Return true if Object[property] satisfies Function predicate for each Object in Array self.



Return jQuery Object (Array) from HTML String (Array).


Return HTML String (Array) from jQuery Object (Array).


Return true if DOM node self and that have the same HTML content or are the same ID.



Return elements of Array self not in Array that.

Jump to Line
Something went wrong with that request. Please try again.