Skip to content
Lance Pollard edited this page Apr 12, 2012 · 1 revision

Utils

Have CachedCommons.org let you load files with require('socket.io'):

# coach/controllers/sockets
require('socket.io')

# essentially...
require = (key) ->
  $.getScript("http://cachedcommons.org/javascripts/#{key}.min.js")

window.μ = new class Urban αστικός, == Urban

Geocoordinates

User.within(miles: 10)

Array

  • extractArgs (args)
  • extractOptions
  • extractBlock
  • sortBy

Number

  • isInt
  • isFloat

Object

  • cloneHash
  • cloneArray
  • deepMerge
  • deepMergeWithArray
  • alias
  • defineProperty
  • accessor
  • getter
  • setter
  • methods
  • delegate
  • isHash
  • kind
  • isPresent
  • isBlank
  • has
  • isA

Function

  • functionName

String

  • parameterize
  • constantize
  • camelize
  • underscore
  • singularize
  • pluralize
  • capitalize
  • interpolate
  • trim

RegExp

  • regexpEscape

Date

  • now
  • date

Tower.js

Everything here will be reflected on http://towerjs.org/guides.

Clone this wiki locally