{"_id":"array-to-sentence","_rev":"632523","name":"array-to-sentence","description":"Join all elements of an array and create a human-readable string","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2021-08-25T09:36:01.000Z","created":"2014-11-17T09:29:28.167Z","2.0.0":"2018-03-02T11:05:33.740Z","2.0.0-2":"2018-03-01T09:12:30.075Z","2.0.0-1":"2018-02-27T03:18:41.771Z","2.0.0-0":"2018-02-27T03:12:48.925Z","1.1.0":"2016-06-15T07:07:12.266Z","1.0.4":"2015-12-04T17:36:34.091Z","1.0.3":"2015-10-24T07:29:48.861Z","1.0.2":"2015-10-16T16:01:37.009Z","1.0.1":"2014-11-18T01:44:32.273Z","1.0.0":"2014-11-17T09:29:28.167Z"},"users":{"felegz":true,"cheapsteak":true},"repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"versions":{"2.0.0":{"name":"array-to-sentence","version":"2.0.0","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"prebuild":"eslint --fix --format=codeframe module.mjs test.js","build":"rollup --config=node:module","pretest":"npm run-script build","test":"nyc --reporter=html --reporter=text node test.js"},"license":"ISC","files":["index.js","index.mjs"],"module":"index.mjs","keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^5.4.0","eslint":"^4.18.1","nyc":"^11.5.0","rollup":"^0.56.3","rollup-config-module":"^2.0.0","tape":"^4.9.0"},"eslintConfig":{"extends":"@shinnn"},"gitHead":"e5773be390915955865e6ed6a9c1ac5e291f3a5d","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@2.0.0","_npmVersion":"5.7.1","_nodeVersion":"9.6.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"1e57691fdc18ba24a47e3ebabda9324baac960b4","size":2225,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-2.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-to-sentence_2.0.0_1519988733637_0.3702260063987566"},"_hasShrinkwrap":false,"publish_time":1519988733740,"_cnpm_publish_time":1519988733740},"2.0.0-2":{"name":"array-to-sentence","version":"2.0.0-2","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"prebuild":"eslint --fix --format=codeframe module.mjs test.js","build":"rollup --config=node:module","pretest":"npm run-script build","test":"nyc --reporter=html --reporter=text node test.js"},"license":"ISC","files":["index.js","index.mjs"],"module":"index.mjs","keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^5.4.0","eslint":"^4.18.1","nyc":"^11.5.0","rollup":"^0.56.3","rollup-config-module":"^2.0.0","tape":"^4.9.0"},"eslintConfig":{"extends":"@shinnn"},"gitHead":"8209426ea388ad65c4befab0c9ad5b8de2c75e72","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@2.0.0-2","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"6aaaeacf50c3c9c8a8dc235bcd08b37fac1e394d","size":2245,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-2.0.0-2.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-2.0.0-2.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-to-sentence_2.0.0-2_1519895550027_0.9117537913376808"},"_hasShrinkwrap":false,"publish_time":1519895550075,"_cnpm_publish_time":1519895550075},"2.0.0-1":{"name":"array-to-sentence","version":"2.0.0-1","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"prebuild":"eslint --fix --format=codeframe module.mjs test.js","build":"rollup --config=node:module","pretest":"npm run-script build","test":"nyc --reporter=html --reporter=text node test.js"},"license":"MIT","module":"index.mjs","files":["index.js","index.mjs"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^5.4.0","eslint":"^4.18.1","nyc":"^11.5.0","rollup":"^0.56.3","rollup-config-module":"^2.0.0","tape":"^4.9.0"},"eslintConfig":{"extends":"@shinnn"},"gitHead":"5e96e64d2d4177238eb6b88492d060354308b460","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@2.0.0-1","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"f0a6d011d0eb5dceb3326611a481e132622ae3ed","size":2445,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-2.0.0-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-2.0.0-1.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-to-sentence_2.0.0-1_1519701521659_0.9515439924421134"},"_hasShrinkwrap":false,"publish_time":1519701521771,"_cnpm_publish_time":1519701521771},"2.0.0-0":{"name":"array-to-sentence","version":"2.0.0-0","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"pretest":"eslint --fix --format=codeframe --ignore-path .gitignore .","test":"node --throw-deprecation --track-heap-objects test.js","coverage":"istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^3.3.6","eslint":"^3.13.1","istanbul":"^0.4.5","require-from-string":"^1.2.1","rollup":"^0.41.4","tape":"^4.6.3"},"eslintConfig":{"extends":"@shinnn"},"gitHead":"cd1808e40485db635d7da59c2a7bc2e124ab6d9d","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@2.0.0-0","_npmVersion":"5.6.0","_nodeVersion":"9.6.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"43a80e57adc4c9cc556d8504c56b18d2a19b3214","size":2459,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-2.0.0-0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-2.0.0-0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/array-to-sentence_2.0.0-0_1519701168865_0.7189068312165536"},"_hasShrinkwrap":false,"publish_time":1519701168925,"_cnpm_publish_time":1519701168925},"1.1.0":{"name":"array-to-sentence","version":"1.1.0","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"pretest":"eslint --fix --config @shinnn --ignore-path .gitignore .","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","jsnext:main":"index.jsnext.js","files":["index.js","index.jsnext.js"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^2.3.0","eslint":"^2.12.0","istanbul":"^0.4.3","require-from-string":"^1.2.0","rollup":"^0.31.2","tape":"^4.5.1"},"gitHead":"4c817797d1dfdf7de662a53d8616dfdf2025f60f","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@1.1.0","_shasum":"c804956dafa53232495b205a9452753a258d39fc","_from":".","_npmVersion":"3.9.3","_nodeVersion":"5.9.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"c804956dafa53232495b205a9452753a258d39fc","size":2560,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.1.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/array-to-sentence-1.1.0.tgz_1465974431563_0.26641089422628284"},"directories":{},"publish_time":1465974432266,"_cnpm_publish_time":1465974432266,"_hasShrinkwrap":false},"1.0.4":{"name":"array-to-sentence","version":"1.0.4","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"pretest":"eslint --config @shinnn browser.js index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","files":["index.js"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^1.2.0","eslint":"^1.7.3","istanbul":"^0.4.0","tape":"^4.2.2"},"gitHead":"c3a4f2a967329a66f071ec3cf5e777e68e5a9003","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@1.0.4","_shasum":"3ad18fd38b921d0ef5f2705cfabcca091d3b2903","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"3ad18fd38b921d0ef5f2705cfabcca091d3b2903","size":2455,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.0.4.tgz"},"directories":{},"publish_time":1449250594091,"_cnpm_publish_time":1449250594091,"_hasShrinkwrap":false},"1.0.3":{"name":"array-to-sentence","version":"1.0.3","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"pretest":"eslint --config @shinnn browser.js index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","files":["index.js"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^1.2.0","eslint":"^1.7.3","istanbul":"^0.4.0","tape":"^4.2.2"},"gitHead":"85a1f16976a6610accb910a6b3fe0362d9643adf","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@1.0.3","_shasum":"155bdb9b488941ef65a4a68a8a7771aabd68c402","_from":".","_npmVersion":"3.3.8","_nodeVersion":"4.2.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"155bdb9b488941ef65a4a68a8a7771aabd68c402","size":2502,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.0.3.tgz"},"directories":{},"publish_time":1445671788861,"_cnpm_publish_time":1445671788861,"_hasShrinkwrap":false},"1.0.2":{"name":"array-to-sentence","version":"1.0.2","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"git+https://github.com/shinnn/array-to-sentence.git"},"scripts":{"pretest":"eslint --config @shinnn browser.js index.js test.js","test":"node --strong_mode --throw-deprecation --track-heap-objects test.js","coverage":"node --strong_mode node_modules/.bin/istanbul cover test.js"},"license":"MIT","files":["index.js"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"@shinnn/eslint-config":"^1.1.0","eslint":"^1.6.0","istanbul":"^0.3.22","tape":"^4.2.1"},"gitHead":"31fd9cc91306e080e047dd07f87a4c82f38ca392","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence#readme","_id":"array-to-sentence@1.0.2","_shasum":"4f4c48b064514293214309b812858a505ed40830","_from":".","_npmVersion":"3.3.8","_nodeVersion":"4.2.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"4f4c48b064514293214309b812858a505ed40830","size":2491,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.0.2.tgz"},"directories":{},"publish_time":1445011297009,"_cnpm_publish_time":1445011297009,"_hasShrinkwrap":false},"1.0.1":{"name":"array-to-sentence","version":"1.0.1","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"https://github.com/shinnn/array-to-sentence"},"scripts":{"pretest":"eslint *.js & jscs *.js","test":"node test.js | tap-spec","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/array-to-sentence/blob/master/LICENSE"}],"main":"array-to-sentence-cjs.js","files":["array-to-sentence-cjs.js","LICENSE"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"eslint":"^0.9.2","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jscs":"^1.7.3","require-bower-files":"^1.0.0","tap-spec":"^1.0.1","tape":"^3.0.3"},"jscsConfig":{"preset":"google","maximumLineLength":98},"gitHead":"502d5b6042b16593af6ca7b38274241684766f1a","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence","_id":"array-to-sentence@1.0.1","_shasum":"4928ea09704ac72667d445560df4ec894ff7a49d","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"4928ea09704ac72667d445560df4ec894ff7a49d","size":2591,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.0.1.tgz"},"directories":{},"publish_time":1416275072273,"_cnpm_publish_time":1416275072273,"_hasShrinkwrap":false},"1.0.0":{"name":"array-to-sentence","version":"1.0.0","description":"Join all elements of an array and create a human-readable string","repository":{"type":"git","url":"https://github.com/shinnn/array-to-sentence"},"scripts":{"pretest":"eslint *.js & jscs *.js","test":"node test.js | tap-spec","coverage":"istanbul cover test.js","coveralls":"${npm_package_scripts_coverage} && istanbul-coveralls"},"licenses":[{"type":"MIT","url":"https://github.com/shinnn/array-to-sentence/blob/master/LICENSE"}],"main":"array-to-sentence-cjs.js","files":["array-to-sentence-cjs.js","LICENSE"],"keywords":["to-sentence","sentence","array","join","human","readable","string","separator","comma","and","browser","client-side"],"devDependencies":{"eslint":"^0.9.2","istanbul":"^0.3.2","istanbul-coveralls":"^1.0.1","jscs":"^1.7.3","require-bower-files":"^1.0.0","tap-spec":"^1.0.1","tape":"^3.0.3"},"jscsConfig":{"preset":"google","maximumLineLength":98},"gitHead":"3003b4f4568a6fe16d26dc41562fd3b0b54e0168","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"homepage":"https://github.com/shinnn/array-to-sentence","_id":"array-to-sentence@1.0.0","_shasum":"15326cea6d4391a9a90cab3748c0b452473dc5ab","_from":".","_npmVersion":"2.1.7","_nodeVersion":"0.10.33","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"dist":{"shasum":"15326cea6d4391a9a90cab3748c0b452473dc5ab","size":2596,"noattachment":false,"key":"/array-to-sentence/-/array-to-sentence-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-to-sentence/download/array-to-sentence-1.0.0.tgz"},"directories":{},"publish_time":1416216568167,"_cnpm_publish_time":1416216568167,"_hasShrinkwrap":false}},"readme":"# array-to-sentence\n\n[![npm version](https://img.shields.io/npm/v/array-to-sentence.svg)](https://www.npmjs.com/package/array-to-sentence)\n[![Build Status](https://travis-ci.org/shinnn/array-to-sentence.svg?branch=master)](https://travis-ci.org/shinnn/array-to-sentence)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/array-to-sentence.svg)](https://coveralls.io/github/shinnn/array-to-sentence)\n\nJoin all elements of an array and create a human-readable string\n\n```javascript\narrayToSentence(['foo', 'bar', 'baz', 'qux']); //=> 'foo, bar, baz and qux'\n```\n\n## Installation\n\n#### [npm](https://www.npmjs.com/)\n\n```\nnpm install array-to-sentence\n```\n\n## API\n\n```js\nimport arrayToSentence from 'array-to-sentence';\n```\n\n### arrayToSentence(*array* [, *options*])\n\n*array*: `Array<any>`  \n*options*: `Object`  \nReturn: `string`\n\nIt joins all elements of an array, and returns a string in the form `A, B, ... and X`.\n\n```javascript\narrayToSentence(['one', 'two', 3]); //=> 'one, two and 3'\narrayToSentence(['one', 'two']); //=> 'one and two'\narrayToSentence(['one']); //=> 'one'\n\narrayToSentence([]); //=> ''\n```\n\n### options.separator\n\nType: `string`  \nDefault: `', '`\n\nSet the separator string of each word.\n\n### options.lastSeparator\n\nType: `string`  \nDefault: `' and '`\n\nSet the separator string before the last word.\n\n```javascript\narrayToSentence(['A', 'B', 'C'], {\n  separator: '-',\n  lastSeparator: '-'\n}); //=> 'A-B-C'\n\narrayToSentence(['Earth', 'Wind', 'Fire'], {\n  lastSeparator: ' & '\n}); //=> 'Earth, Wind & Fire'\n```\n\n## Acknowledgement\n\nI used [`.toSentence()` method](https://epeli.github.io/underscore.string/#tosentence-array-delimiter-lastdelimiter-gt-string) of [underscore.string](https://github.com/epeli/underscore.string) as API design reference. Thanks, [Esa-Matti Suuronen](https://github.com/epeli) and [the contributors](https://github.com/epeli/underscore.string/graphs/contributors).\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","_attachments":{},"homepage":"https://github.com/shinnn/array-to-sentence#readme","bugs":{"url":"https://github.com/shinnn/array-to-sentence/issues"},"license":"ISC"}