1.1.1 • Published 3 years ago

split-on-steroids v1.1.1

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

Extended Split Function | Split on stroids

Installation

Using npm:

$ npm i split-on-steroids

Options

Split function can be returnded as string or as array,

MethodParentResultDescription
.asArrayString.steroid_split(array)arrayReturn going to be array
.asStringString.steroid_split(array)stringReturn going to be string

Usage

NOTE #1: If you pass string as argument | exampleString.steroid_split(".") | function behavior will the be same as the native | String.prototype.split() | function.

Return as array:

import "split-on-steroids";

// Start using

let exampleString = "Hi, I am example string. And I have example sentence";
exampleString.steroid_split([",", "."]).asArray;

// Returns ["Hi", "I am example string", "And I have example sentence"]

Return as string:

import "split-on-steroids";

// Start using

let exampleString = "Hi, I am example string. And I have example sentence";
exampleString.steroid_split([",", "."]).asString;

// Returns "HiI am example stringAnd I have example sentence"
1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago