join-component

Join a list

2 个版本
安装
npm install join-component
yarn add join-component
pnpm add join-component
bun add join-component
README

join

Join a list in a nice human friendly way.

Installation

$ component install component/join

API

join(arr)

should default to "and".

join(['foo', 'bar']).should.equal('foo and bar');

join(arr, str)

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');

License

MIT

版本列表
1.1.0 2012-12-30
1.0.0 2012-12-18