2.2.0 • Published 10 months ago

@aegenet/belt-string-split v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

npm version

@aegenet/belt-string-split

String Split is an alternative to String.split, with the ability to ignore the split character inside 'tags'

💾 Installation

yarn add @aegenet/belt-string-split@^2.0.0
# or
npm i @aegenet/belt-string-split@^2.0.0

📝 Usage

import { StringSplit } from '@aegenet/belt-string-split';

const stringSplit = new StringSplit({
  separator: ' ',
  ignoreTags: {
    '"': '"',
  },
});

stringSplit.split('Hello Brian "Something Else"');
//  ['Hello', 'Brian', '"Something Else"']

const stringSplit = new StringSplit({
  separator: ' ',
  ignoreTags: {
    '(': ')',
  },
});

stringSplit.split('Hello Brian (Something Else)');
// ['Hello', 'Brian', '(Something Else)']
stringSplit.split('Hello Brian (Something Else (or something))');
// ['Hello', 'Brian', '(Something Else (or something))']
2.2.0

10 months ago

2.1.0

11 months ago

1.6.2

12 months ago

1.7.0

12 months ago

2.0.0

12 months ago

1.5.0

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago