lively.lang
v1.0.25
Published
JavaScript utils providing useful abstractions for working with collections, functions, objects.
Downloads
195
Readme
lively.lang
What? This project packages abstractions for JavaScript that proved to be useful in the Lively Web project. On first glance it might seem to be just another underscore.js library but apart from extensions to existing JavaScript objects and classes it also provides abstractions for asynchronous code, new object representations, and functions for inspecting JavaScript objects.
Why? Make it easy to reuse abstractions we found helpful in all kinds of contexts. All features can be used in browser environments and in node.js. Actually, one motivation for this library was to have unified interfaces across JavaScript environments.
How? By default the library is non-invasive, i.e. no global objects are modified. To use provided functions you can either
- call them directly,
- use underscore.js-like chain/value wrapping,
- or install extension methods explicitly in global objects.
Summary
Utility functions for default JavaScript objects:
- Array
- String
- Number
- Object
- Function
- Date
Abstractions usually not included by default in JavaScript runtimes:
- node.js-like event emitter interface (uses event module on node.js)
- Path (deep property access)
- Interval
- Grid
- Tree
- array projection
- Closure
- Messengers (generic interface for remote-messaging)
- Workers based on messengers
Please see the individual doc files for detailed information.