extractwords
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -6,3 +6,3 @@ const defaults = { | ||
module.exports = (str, options = {}) => { | ||
module.exports = (string, options = {}) => { | ||
options = { | ||
@@ -15,9 +15,9 @@ ...defaults, | ||
if (options.punctuation) { | ||
words = str.match(/\S+/g) || []; | ||
words = string.match(/\S+/g) || []; | ||
} else { | ||
words = str.match(/[a-zA-Z]+('[a-zA-Z]+)?/g) || []; | ||
words = string.match(/[a-zA-Z]+('[a-zA-Z]+)?/g) || []; | ||
} | ||
if (options.lowercase) { | ||
words = words.map(str => str.toLowerCase()); | ||
words = words.map(string => string.toLowerCase()); | ||
} | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "extractwords", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Extract the words from a string", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=8.3.0" | ||
}, | ||
@@ -33,4 +33,4 @@ "license": "MIT", | ||
"devDependencies": { | ||
"xo": "^0.24.0" | ||
"xo": "^0.32.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3357