8 lines
208 B
JavaScript
8 lines
208 B
JavaScript
![]() |
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+/);
|
||
|
};
|