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

@rocket.chat/string-helpers

Package Overview
Dependencies
Maintainers
9
Versions
615
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rocket.chat/string-helpers - npm Package Compare versions

Comparing version 0.6.3-dev.291 to 0.6.3-dev.298

1

dist/cjs/escapeHTML.js

@@ -11,2 +11,3 @@ "use strict";

'®': 'reg',
'™': 'trade',
'<': 'lt',

@@ -13,0 +14,0 @@ '>': 'gt',

2

dist/cjs/escapeHTML.spec.js

@@ -10,3 +10,3 @@ "use strict";

expect(escapeHTML_1.escapeHTML('¢')).toBe('&cent;');
expect(escapeHTML_1.escapeHTML('¢ £ ¥ € © ®')).toBe('&cent; &pound; &yen; &euro; &copy; &reg;');
expect(escapeHTML_1.escapeHTML('¢ £ ¥ € © ® ™')).toBe('&cent; &pound; &yen; &euro; &copy; &reg; &trade;');
expect(escapeHTML_1.escapeHTML(5)).toBe('5');

@@ -13,0 +13,0 @@ expect(escapeHTML_1.escapeHTML('')).toBe('');

@@ -12,2 +12,3 @@ "use strict";

reg: '®',
trade: '™',
lt: '<',

@@ -14,0 +15,0 @@ gt: '>',

@@ -23,2 +23,3 @@ "use strict";

expect(unescapeHTML_1.unescapeHTML('&reg; trademark')).toBe('® trademark');
expect(unescapeHTML_1.unescapeHTML('&trade; unregistered trademark')).toBe('™ unregistered trademark');
expect(unescapeHTML_1.unescapeHTML('&copy; 1992. License available for 50 &cent;')).toBe('© 1992. License available for 50 ¢');

@@ -25,0 +26,0 @@ expect(unescapeHTML_1.unescapeHTML('&nbsp;')).toBe(' ');

@@ -8,2 +8,3 @@ var characterToHtmlEntityCode = {

'®': 'reg',
'™': 'trade',
'<': 'lt',

@@ -10,0 +11,0 @@ '>': 'gt',

@@ -8,3 +8,3 @@ import { escapeHTML } from './escapeHTML';

expect(escapeHTML('¢')).toBe('&cent;');
expect(escapeHTML('¢ £ ¥ € © ®')).toBe('&cent; &pound; &yen; &euro; &copy; &reg;');
expect(escapeHTML('¢ £ ¥ € © ® ™')).toBe('&cent; &pound; &yen; &euro; &copy; &reg; &trade;');
expect(escapeHTML(5)).toBe('5');

@@ -11,0 +11,0 @@ expect(escapeHTML('')).toBe('');

@@ -9,2 +9,3 @@ var htmlEntityCodeToCharacter = {

reg: '®',
trade: '™',
lt: '<',

@@ -11,0 +12,0 @@ gt: '>',

@@ -21,2 +21,3 @@ import { unescapeHTML } from './unescapeHTML';

expect(unescapeHTML('&reg; trademark')).toBe('® trademark');
expect(unescapeHTML('&trade; unregistered trademark')).toBe('™ unregistered trademark');
expect(unescapeHTML('&copy; 1992. License available for 50 &cent;')).toBe('© 1992. License available for 50 ¢');

@@ -23,0 +24,0 @@ expect(unescapeHTML('&nbsp;')).toBe(' ');

{
"name": "@rocket.chat/string-helpers",
"version": "0.6.3-dev.291+4fe3e5af",
"version": "0.6.3-dev.298+c66b22e1",
"description": "Helper functions for string manipulation",

@@ -52,3 +52,3 @@ "keywords": [

"devDependencies": {
"@rocket.chat/eslint-config-alt": "^0.6.3-dev.291+4fe3e5af",
"@rocket.chat/eslint-config-alt": "^0.27.0",
"@rocket.chat/prettier-config": "^0.27.0",

@@ -70,3 +70,3 @@ "@types/jest": "^26.0.24",

},
"gitHead": "4fe3e5af7da4f16cb5c4317a5f2ce297c0ff73da"
"gitHead": "c66b22e14693622820edef4dabd0b34f0b04ece4"
}

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

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

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