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

no-cliches

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

no-cliches - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

5

cliches.js

@@ -1,2 +0,2 @@

const cliches = [
let cliches = [
'a chip off the old block',

@@ -372,2 +372,3 @@ 'a clean slate',

'like taking candy from a baby',
'like the plague',
'like there\'s no tomorrow',

@@ -702,2 +703,4 @@ 'lion\'s share',

// Replace a basic white-space with more-robust white-space matching for new lines, half-space etc.
cliches = cliches.map(w => w.replace(/ /g, '[\\b\\s\\u200C]*'));
const clicheRegex = new RegExp(`\\b(${cliches.join('|')})\\b`, 'gi');

@@ -704,0 +707,0 @@ const matcher = require('./matcher');

6

package.json
{
"name": "no-cliches",
"version": "0.2.2",
"version": "0.3.0",
"description": "Find clichés in your writings",

@@ -41,3 +41,2 @@ "main": "cliches.js",

"devDependencies": {
"jasmine-node": "^2.0.1",
"eslint": "^5.12.0",

@@ -47,4 +46,5 @@ "eslint-config-airbnb": "^17.1.0",

"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.12.3"
"eslint-plugin-react": "^7.12.3",
"jasmine-node": "^3.0.0"
}
}
const cliches = require('../cliches');
const clichesInSentence = 'Writing specs puts me at loose ends.';
const clichesInSentenceWithFormatting = 'Writing specs puts me at loose\n ends.';
const goodSentence = 'The good dog jumps over the bad cat.';

@@ -22,2 +23,7 @@

});
it('should not have a problem with white-space formatting', () => {
const results = cliches(clichesInSentenceWithFormatting);
expect(results).toEqual([{ index: 22, offset: 16 }]);
});
});
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