0.1.2 • Published 12 years ago

tk v0.1.2

Weekly downloads
3
License
-
Repository
github
Last release
12 years ago

NodeJS / Javascript Toolkit

This is a set of extensions for native objects. Almost all native objects will probably have usefull extensions such as formatting a number or comparing dates or even padding a string.

Before suggesting any extension, check if native objects don't have them already. For example, Array.map and Array.filter are already in the core.

Here is a list (possibly not up-to-date) of the extensions:

Array

  • .first( n )
  • .last( n )
  • .without(v1, .., vN)
  • .compact()
  • .unique()
  • .sum()
  • .product()
  • .grep(/re/)
  • .min()
  • .max()

Date

  • .addHour(n)
  • .addDay(n)
  • .addWeek(n)
  • .addMonth(n)
  • .addYear(n)
  • .before(date)
  • .after(date)
  • .between(start, end)
  • .diff(date)

Function

  • .defer(ms)
  • .curry(arg1, .., argN)

Math

Number

String

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

13 years ago