xs

xs

A collections library with one interface to rule them.

Showing:

Popularity

Downloads/wk

5

Maintenance

No Maintenance Data Available

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

xs.js | Never Too Many Collections

xs is a JavaScript library that lets you treat most everything like a collection that just does what you mean with via a unified, consistent interface.

// Objects...
var o = xs({ a:1, b:2, c:3, 3:'d' });
o.keys();
// --> [ 'a', 'b', 'c', '3' ]
o.values();
// --> [ 1, 2, 3, 'd' ]
o.attr(3);
// --> 'd'

// Arrays...
var a = xs([ 1, 2, 3, 'd' ]);
a.keys();
// --> [ 0, 1, 2, 3 ]
a.values();
// --> [ 1, 2, 3, 'd' ]
a.attr(3);
// --> 'd'

var inc = function(x){ return x+1; };
o.map(inc);
// --> xs({ a:2, b:3, c:4, 3:'d1' })
a.map(inc);
// --> xs([ 2, 3, 4, 'd1' ])


  • Supports both Object-oriented and Functional styles.
  • Plays nice with other libraries (like jQuery).
  • Extensible via simple plugins.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100