1.1.2 • Published 3 years ago

jsmp-infra-khrystyna-kosmanenko-mypackage v1.1.2

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

Create array with section objects from array with strings

Purpose this library is creating array with section objects which contains name with letter and data with array of strings started from current letter. It will help if you have an array with strings, but you want to create section list from it.

Installation

Open a Terminal in the project root and run:

npm i jsmp-infra-khrystyna-kosmanenko-mypackage

Usage

import { createSectionList } from 'jsmp-infra-khrystyna-kosmanenko-mypackage/lib';

createSectionList(['Anna', 'Loren', 'Katy', 'Anabel', 'Leo']);

// [{ name: 'A', data: ['Anabel', 'Anna'] }, { name: 'K', data: ['Katy'] }, { name: 'L', data: ['Leo', 'Loren'] }];

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago