1.0.1 • Published 7 years ago

words-array v1.0.1

Weekly downloads
237
License
ISC
Repository
gitlab
Last release
7 years ago

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 ["そ","こ","で","彼","ら","は,","オ","リ","ー",...,"レ","ム","に","帰","っ","た。"]