@kontentino/array-semantic-join
v2.0.0
Published
Helper function whose input is an array and output is a semantic string with joined items of the input array.
Downloads
326
Maintainers
Readme
array-semantic-join by Kontentino
GITHUB: array-semantic-join
Helper function whose input is an array and output is a semantic string with joined items of the input array.
Installation
$ npm install @kontentino/array-semantic-join
or
$ yarn add @kontentino/array-semantic-join
Usage
import arraySemanticJoin from '@kontentino/array-semantic-join';
...
const userNames = ['John', 'Jane', 'Patrick'];
...
<span>
{arraySemanticJoin(userNames)} // output: "John, Jane and Patrick"
</span>
...
Docs
| Function | |:-------------| | arraySemanticJoin(inputArray: Array): String |