dotsplit.js

Transform dot-delimited strings to array of strings for Node.js and the browser.

Usage no npm install needed!

<script type="module">
  import dotsplitJs from 'https://cdn.skypack.dev/dotsplit.js';
</script>

README

dotsplit.js

Transform dot-delimited strings to array of strings for Node.js and the browser.

Build Status Code Climate js-standard-style

npm install dotsplit.js --save

You can also use Duo, Bower or download the files manually.

npm stats

npm NPM downloads David

API Example

Split on dot

dotsplit('group.0.section.a.seat.3')
//=> ['group', '0', 'section', 'a', 'seat', '3']

Split on dot preserving escaped characters

dotsplit('01.document\\.png')
//=> ['01', 'document.png']

API

dotsplit(String)

arguments
  • string (String) Dot-delimited string.
returns
  • (Array) Array of strings.

Contributing

SEE: contributing.md

Licenses

GitHub license