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.0 to 1.1.1

2

index.js

@@ -14,3 +14,3 @@ const defaults = {

if (options.punctuation) {
words = str.match(/\S*[a-zA-Z]+\S*('\S*[a-zA-Z]+\S*)?/g) || [];
words = str.match(/\S+/g) || [];
} else {

@@ -17,0 +17,0 @@ words = str.match(/[a-zA-Z]+('[a-zA-Z]+)?/g) || [];

{
"name": "extractwords",
"version": "1.1.0",
"version": "1.1.1",
"description": "Extract the words from a string",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,18 +20,16 @@ # extractwords [![Build Status](https://api.travis-ci.com/f-a-r-a-z/extractwords.svg?branch=master)](https://travis-ci.com/f-a-r-a-z/extractwords)

extractwords('Good morning, how are you?', {lowercase: true});
//=> ['good', 'morning', 'how', 'are', 'you']
extractwords('Good Morning, how are you?', {punctuation: true});
//=> ['Good', 'Morning,', 'how', 'are', 'you?']
extractwords('Great work ... son.', {punctuation: true});
//=> ['Great', 'work', 'son.']
extractwords("He didn't pay for his meal m'aam");
//=> ['He', "didn't", 'pay', 'for', 'his', 'meal', "m'aam"]
extractwords("17651Hello*&!(*2I'm_++`~gOOd");
extractwords("17651Hello*&!(*2I'm_++`~gOOd 2");
//=> ['Hello', "I'm", 'gOOd']
extractwords('Good morning, how are you?', {lowercase: true});
//=> ['good', 'morning', 'how', 'are', 'you']
extractwords('Good Morning. how are you?', {punctuation: true});
//=> ['Good', 'Morning.', 'how', 'are', 'you?']
extractwords('I . am ... go0d 2', {punctuation: true});
//=> ['I', '.', 'am', '...', 'go0d', '2']
```

@@ -66,3 +64,2 @@

If `true`, all punctuation next to words are retained.
If `true`, all punctuation is retained.
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