@jswork/next-slice2str

1.0.6 • Public • Published

next-slice2str

Slice string to two part.

version license size download

installation

npm install -S @jswork/next-slice2str

apis

argument type default
str String -
index Number -
step Number 0

usage

import '@jswork/next-slice2str';

const str = 'test@123.com';
const idx = str.indexOf('@');
const arr1 = nx.slice2str(str, idx);
const arr2 = nx.slice2str(str, idx, 1);

// [ 'test', '123.com' ]
// [ 'test', '123.com' ]

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/next-slice2str

Homepage

js.work

Weekly Downloads

37

Version

1.0.6

License

MIT

Unpacked Size

5.59 kB

Total Files

6

Last publish

Collaborators

  • afeiship