Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extractwords

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extractwords - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

8

index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc