$ npm install join-component
Join a list in a nice human friendly way.
$ component install component/join
should default to "and".
join(['foo', 'bar']).should.equal('foo and bar');
should join.
join([], 'and').should.equal('');
join(['foo'], 'and').should.equal('foo');
join(['foo', 'bar'], 'and').should.equal('foo and bar');
join(['foo', 'bar', 'raz'], 'or').should.equal('foo, bar or raz');
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE