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

flex-algo

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flex-algo - npm Package Compare versions

Comparing version 0.1.30 to 0.1.31

2

lib/string.d.ts
export declare function lengthOfLongestSubstring(s: string): number;
export declare function backspaceCompare(source: string, target: string): boolean;
export declare function strip(str: string): string;
export declare function isPalindrome(str: string): boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.backspaceCompare = exports.lengthOfLongestSubstring = void 0;
exports.isPalindrome = exports.strip = exports.backspaceCompare = exports.lengthOfLongestSubstring = void 0;
function lengthOfLongestSubstring(s) {

@@ -58,1 +58,19 @@ if (s.length === 0) {

exports.backspaceCompare = backspaceCompare;
function strip(str) {
return str.replace(/\d+|\s+|[\?,:]+/g, '').toLowerCase();
}
exports.strip = strip;
function isPalindrome(str) {
var s = strip(str);
var p1 = 0;
var p2 = s.length - 1;
while (p1 < p2) {
if (s[p1] !== s[p2]) {
return false;
}
p1 += 1;
p2 -= 1;
}
return true;
}
exports.isPalindrome = isPalindrome;

2

package.json
{
"name": "flex-algo",
"version": "0.1.30",
"version": "0.1.31",
"description": "\"SDK for commonly used data structure and algorithms\"",

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

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