array-join-custom-separator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Array Join with Custom Separator

Join Array with Custom Separator and last Separator

Installation

npm i --save array-join-custom-separator

Usage

To use it, just import it into your application

import { ArrayJoinWithCustomSeparator } from 'array-join-custom-separator'; // import
const input = ['apple', 'banana', 'orange'];
ArrayJoinWithCustomSeparator(input);

}

To set a custom separator:

import { ArrayJoinWithCustomSeparator } from 'array-join-custom-separator'; // import
const input = ['apple', 'banana', 'orange'];
ArrayJoinWithCustomSeparator(input, " - ");

}

To set a custom separator and last separator:

import { ArrayJoinWithCustomSeparator } from 'array-join-custom-separator'; // import
const input = ['apple', 'banana', 'orange'];
ArrayJoinWithCustomSeparator(input, " - ", " and ");

}

Package Sidebar

Install

npm i array-join-custom-separator

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

8.16 kB

Total Files

6

Last publish

Collaborators

  • bunker.dev