0.1.4 • Published 4 years ago
seqence v0.1.4
seqence
List a sequence of numbers or texts quickly and make your code cleaner!
Getting Started
npm i seqence
Use this command line on a terminal within your project to install.
Sequencing
To begin, you must use the function defined in the import | require
of your project.
const seqence = require('seqence');
After that, just use the function seqence(array: [], options?: {})
to return a string.
console.assert(seqence([1, 2, 3]) === '1, 2 and 3');
// Returns '1, 2 and 3' in the console.
console.assert(seqence([1, 2, 3], { comma: '...' }) === '1... 2 and 3');
// Returns '1... 2 and 3' in the console.
console.assert(seqence([1, 2, 3], { comma: '...', word: 'or' }) === '1... 2 or 3');
// Returns '1... 2 or 3' in the console.