findpattern
Advanced tools
Comparing version 0.0.4 to 0.0.42
{ | ||
"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; | ||
}; | ||
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
11865
17
121
1
94