GitShow/ljharb/listify
ljharb

listify

Turn an array into a list of comma-separated values, appropriate for use in an English sentence.

by ljharb
Star on GitHubForknpm

JavaScript

26 stars4 forks1 contributorQuiet · 3y agoSince 2013v1.0.0MIT

Meet the team

See all 1 on GitHub →
ljharb
ljharb93 contributions

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
domenic
v1.0.1 massively bloated the size of this package via dependenciesClosedIssue

Take a look at the lockfile change in https://github.com/whatwg/participate.whatwg.org/pull/104. Going from v1.0.0 to v1.0.1 added the following dependencies to my project: define-properties es-abstract es-to-primitive function-bind has has-symbols is-callable is-date-object is-regex is-symbol object-inspect object-keys object.assign string.prototype.trim string.prototype.trimend string.prototype.trimleft string.prototype.trimright string.prototype.trimstart This isn't really acceptable for a listification package. Would it be possible to revert whatever caused this? The changelog is rather noisy so I can't figure out what it was...

domenic · 6y ago
zeke
What about an `oxford` option?ClosedIssue

This is just silly, but maybe worth adding for fun: As a lover of Oxford commas (AKA serial commas), I personally wouldn't use this feature, but others might.

zeke · 10y ago
franciscocgoncalves
Fixed separator bugMergedPR

When reading your example I noticed that you were inserting a separator after the penultimate element of the array before the lastWord which, in my opinion, isn't appropriate for use in a sentence. I changed it in the following way. Behavior before fix: Behavior after fix: I also added a validation test that asserts two items with finalWord.

franciscocgoncalves · 11y ago
Structured data for AI agents

Repository: ljharb/listify. Description: Turn an array into a list of comma-separated values, appropriate for use in an English sentence. Stars: 26, Forks: 4. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v1.0.0 (6y ago). Open PRs: 1, open issues: 0. Last activity: 3y ago. Community health: 85%. Top contributors: ljharb.

·@ofershap

Replace github.com with gitshow.dev