1.0.0 • Published 2 years ago

array-join-custom-separator v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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 ");

}