JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 388
  • Score
    100M100P100Q96154F
  • License MIT

Split strings without applying separator after limit; Negative limit starts from the end. No regex separators.

Package Exports

  • string-split-keep2
  • string-split-keep2/package.json

Readme

string-split-keep

Split strings without applying separator after limit; Negative limit starts from the end. No regex separators.

    var ssplit = require("string-split-keep")  
      
    ssplit("word1 word2 word3", " ", 2) //["word1", "word2 word3"]  
    ssplit("word1 word2 word3", " ", -2) //["word1 word2", "word3"]