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

@bscotch/cl2-string-server-shared

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bscotch/cl2-string-server-shared - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

5

dist/html.js

@@ -6,3 +6,4 @@ // Modified from https://www.npmjs.com/package/html-escaper

const es = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
const ca = /[&<>'"]/g;
// const ca = /[&<>'"]/g;
const ca = /[&<>"]/g;
const esca = {

@@ -12,3 +13,3 @@ '&': '&amp;',

'>': '&gt;',
"'": '&#39;',
// "'": '&#39;', // No real benefit to doing this, and messes up spellcheck etc on HTML content
'"': '&quot;',

@@ -15,0 +16,0 @@ };

@@ -20,2 +20,10 @@ export type AsyncFunction = (...args: any[]) => Promise<any>;

/**
* Given a string, prefix all RegExp special characters within it with
* a backslash so that the string can be converted into a RegExp pattern
* with all characters treated as literals.
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#escaping
*/
export declare function escapeRegExpSpecialCharacters(string: string): string;
/**
* Convert a string pattern (e.g. "/foo/i") into a RegExp.

@@ -22,0 +30,0 @@ */

@@ -61,2 +61,12 @@ import { marked } from 'marked';

/**
* Given a string, prefix all RegExp special characters within it with
* a backslash so that the string can be converted into a RegExp pattern
* with all characters treated as literals.
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#escaping
*/
export function escapeRegExpSpecialCharacters(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
/**
* Convert a string pattern (e.g. "/foo/i") into a RegExp.

@@ -63,0 +73,0 @@ */

{
"name": "@bscotch/cl2-string-server-shared",
"version": "0.10.0",
"version": "0.10.1",
"description": "",

@@ -45,4 +45,5 @@ "keywords": [],

"dev": "tsc -w",
"test": "node -r source-map-support/register --test dist"
"test": "node -r source-map-support/register --test dist",
"test:dev": "node -r source-map-support/register --test-only --test dist"
}
}
dist/html.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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