Socket
Socket
Sign inDemoInstall

redis-om

Package Overview
Dependencies
13
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.1 to 0.4.2

2

dist/index.d.ts

@@ -666,2 +666,4 @@ import { createClient, createCluster, RediSearchSchema, SearchOptions } from 'redis';

protected escapePunctuation(value: string): string;
/** @internal */
protected escapePunctuationAndSpaces(value: string): string;
}

@@ -668,0 +670,0 @@

16

dist/index.js

@@ -819,9 +819,13 @@ "use strict";

const negationPortion = this.negated ? "-" : "";
const fieldPortion = this.escapePunctuation(this.field.name);
const fieldPortion = this.escapePunctuationAndSpaces(this.field.name);
return `(${negationPortion}@${fieldPortion}:${valuePortion})`;
}
escapePunctuation(value) {
const matchPunctuation = /[,.<>{}[\]"':;!@#$%^&()\-+=~|/\\ ]/g;
const matchPunctuation = /[,.?<>{}[\]"':;!@#$%^&()\-+=~|/\\]/g;
return value.replace(matchPunctuation, "\\$&");
}
escapePunctuationAndSpaces(value) {
const matchPunctuation = /[,.?<>{}[\]"':;!@#$%^&()\-+=~|/\\ ]/g;
return value.replace(matchPunctuation, "\\$&");
}
};

@@ -847,4 +851,3 @@

toString() {
const matchPunctuation = /[,.<>{}[\]"':;!@#$%^&()\-+=~| ]/g;
const escapedValue = this.value.map((s) => s.replace(matchPunctuation, "\\$&")).join("|");
const escapedValue = this.value.map((s) => this.escapePunctuationAndSpaces(s)).join("|");
return this.buildQuery(`{${escapedValue}}`);

@@ -1087,3 +1090,3 @@ }

toString() {
const escapedValue = this.escapePunctuation(this.value);
const escapedValue = this.escapePunctuationAndSpaces(this.value);
return this.buildQuery(`{${escapedValue}}`);

@@ -1140,4 +1143,3 @@ }

toString() {
const matchPunctuation = /[,.<>{}[\]"':;!@#$%^&()\-+=~|]/g;
const escapedValue = this.value.replace(matchPunctuation, "\\$&");
const escapedValue = this.escapePunctuation(this.value);
if (this.exactValue) {

@@ -1144,0 +1146,0 @@ return this.buildQuery(`"${escapedValue}"`);

{
"name": "redis-om",
"version": "0.4.1",
"version": "0.4.2",
"description": "Object mapping, and more, for Redis and Node.js. Written in TypeScript.",

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

Sorry, the diff of this file is not supported yet

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