Socket
Socket
Sign inDemoInstall

findpattern

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.42

.github/dependabot.yml

4

package.json
{
"name": "findpattern",
"version": "0.0.4",
"version": "0.0.42",
"description": "I am tired of this s**t",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"updateAll": "npm version patch --force -m \"New patch commit\" && git push && git push --tags && npm publish"
},

@@ -9,0 +9,0 @@ "deprecated": false,

@@ -65,2 +65,30 @@

# PALINDROME
Here you another example for palindrome stuff.
I hope that it's help you.
```javascript
// MY WAY
const isSameA = ( a,b ) => {
var first = a.split('').sort().join('');
var second = b.split('').sort().join('');
return first === second;
};
console.log( "A_true", isSameA("cat","tac") );
console.log( "A_false", isSameA("cat","rat") );
/****************************************************/
// CHECK IF ARE PALINDROME
const isSameB = ( a,b ) => {
var re = /[\W_]/g;
var lowStr = b.toLowerCase().replace(re, '');
var revIt = lowStr.split('').reverse().join('');
return a === revIt;
};
console.log( "B_true" , isSameB( "cat", "tac") );
console.log( "B_false" , isSameB( "cat", "rat") );
```

@@ -29,2 +29,20 @@ /*!

/***********************************************************************/
// MY WAY
const isSameA = ( a,b ) => {
var first = a.split('').sort().join('');
var second = b.split('').sort().join('');
return first === second;
};
/***********************************************************************/
// CHECK IF ARE PALINDROME
const isSameB = ( a,b ) => {
var re = /[\W_]/g;
var lowStr = b.toLowerCase().replace(re, '');
var revIt = lowStr.split('').reverse().join('');
return a === revIt;
};
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc