words.js 208 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 var isBlank = require('./isBlank'); var trim = require('./trim'); module.exports = function words(str, delimiter) { if (isBlank(str)) return []; return trim(str, delimiter).split(delimiter || /\s+/); };