words-array

v1.0.1
Converts a string into an array of words. Its supports CJK strings.
string words array cjk split unicode

words-array

Converts a string into an array of words. Its supports CJK strings.

Initialy developed for ISBOBackend.

Usage

This module exports a single function.

Example

const wordsArray = require('words-array')
console.log(JSON.stringify(wordsArray("Please could you stop the noise, I'm trying to get some rest.")))
// Returns ["Please","could","you","stop","the","noise,","I'm","trying","to","get","some","rest."]
require('fs').writeFileSync('asd.txt',JSON.stringify(wordsArray("そこで彼らは,オリーブ山と呼ばれる山からエルサレムに帰った。")))
// Returns ["そ","こ","で","彼","ら","は,","オ","リ","ー",...,"レ","ム","に","帰","っ","た。"]
npm i words-array

Metadata

  • ISC
  • Whatever
  • Davide Blasutto
  • released 11/29/2017

Downloads

Maintainers