listify

WebJar for listify

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

listify
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

listify
WebJar for listify
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/ljharb/listify

Download listify

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/listify/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>listify</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/listify/
implementation 'org.webjars.npm:listify:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/listify/
implementation ("org.webjars.npm:listify:1.0.0")
'org.webjars.npm:listify:jar:1.0.0'
<dependency org="org.webjars.npm" name="listify" rev="1.0.0">
  <artifact name="listify" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='listify', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "listify" % "1.0.0"
[org.webjars.npm/listify "1.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

#listify Version Badge

Build Status dependency status dev dependency status

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

Example

var listify = require('listify');

assert(listify([1, 2]) === '1 and 2');
assert(listify([1, 2, 3]) === '1, 2, and 3');
assert(listify([1, 2, 3, 4]) === '1, 2, 3, and 4');
assert(listify([1, 2, 3], { separator: '… ' }) === '1… 2… and 3');
assert(listify([1, 2, 3], { finalWord: false }) === '1, 2, 3');
assert(listify([1, 2, 3], { separator: '… ', finalWord: 'or' }) === '1… 2… or 3');

Tests

Simply clone the repo, npm install, and run npm test

Versions

Version
1.0.0