My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
compact  
Overview of compact
Updated May 5, 2010 by matr...@mac.com

compact

Gets a new array without the empty values.

Usage

objx( array ).compact( [behaviour ]);

array The array to remove items from
behaviour See actions

Example

var a = [1,null,2,null,3,null];
// a.length == 6

a = objx(a).compact().obj();
// a.length == 3
// a == [1,2,3]

Sign in to add a comment
Powered by Google Project Hosting