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.42 to 0.0.43

scripts/palindrome.js

3

init.js

@@ -19,3 +19,3 @@ /*!

// CREATE ROOT STORE
window.findpattern = {};
//window.findpattern = {};

@@ -38,2 +38,3 @@ // FIRST MESSAGE

require('./scripts/findpattern.js');
require('./scripts/palindrome.js');

@@ -40,0 +41,0 @@ // test:

{
"name": "findpattern",
"version": "0.0.42",
"version": "0.0.43",
"description": "I am tired of this s**t",

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

@@ -10,3 +10,3 @@ /*!

const findPattern = ( word ) => {
export const findPattern = ( word ) => {

@@ -30,20 +30,3 @@ let

/***********************************************************************/
window.findpattern( word );
// 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