Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

Underscore.cfc
Project Home Known Issues External Project Link Contact Project

Author: Russ Spivey (All RIAForge projects by this author)
Last Updated: December 12, 2012 5:27 PM
Version: 2.3
Views: 11,160
Downloads: 365
License: MIT

Description:

Underscore.cfc utilizes Coldfusion's new closures and anonymous functions to easily perform collection tasks like filter(), sort(), and map() (and dozens of others). It supports callback-style delegate functions for objects, structs, arrays, queries, and lists.

Underscore.cfc is a port of Underscore.js for Coldfusion.

Full list of library functions:

Collections

- each
- map
- reduce
- reduceRight
- find
- filter
- reject
- all
- any
- include
- invoke
- pluck
- max
- min
- sortBy
- groupBy
- sortedIndex
- shuffle
- toArray
- size

Arrays

- first
- initial
- last
- rest
- compact
- flatten
- without
- union
- intersection
- difference
- uniq
- zip
- indexOf
- lastIndexOf
- range
- arrayConcat
- arrayReverse

Functions

- bind
- bindAll
- memoize
- delay
- once
- after
- wrap
- compose

Objects

- keys
- values
- functions
- extend
- pick
- defaults
- clone
- has
- isEqual
- isEmpty
- isArray
- isObject
- isFunction
- isString
- isNumber
- isBoolean
- isDate

Utilities

- times
- mixin
- result

Last Update:

Recent updates:
- Updated slice to delegate to native arraySlice()
- Fixed mxunit testing expected/actual ordering
- Added handling for empty list values to toArray()
- Added value(), push(), pop(), shift(), unshift(), and join()
- Added fromIndex to lastIndexOf() and indexOf()
- Added countBy(), pairs(), invert(), random(), where(), omit(), and objects()
- Added Foundry support

Requirements:

Coldfusion 10 or Railo 4

Issue Tracker:

This project has an external bug tracker. You can find it here:
https://github.com/russplaysguitar/underscorecf/issues