Skip to content


Subversion checkout URL

You can clone with
Download ZIP

API Reference

Shawn Allen edited this page · 2 revisions
Clone this wiki locally

#[, name])

Create a function returns the named property of its first argument. TODO

# dtools.summarize()

Creates a new summary function that returns statistics about an array of values. Summaries can be configured with the following methods:


Configure the summary to generate keys for the provided properties. Properties can be provided in any form compatible with So:

var summarize = dtools.summarize()
summarize([{foo: 1}, {foo: 2}]);
// {foo: {min: 1}}

# summarize(array)

Generate a summary from an array of values. TODO

# dtools.identity()

The identity function returns its first argument.

// 5

# dtools.index()

The index function returns its second argument, which is a convention used in d3 and most JavaScript Array iteration functions.

[5, 4, 3, 2, 1].map(dtools.index)
// [0, 1, 2, 3]
Something went wrong with that request. Please try again.