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.27.0 to 0.28.0

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.27.0",
"version": "0.28.0",
"description": "Helper functions for string manipulation",

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

"devDependencies": {
"@rocket.chat/eslint-config-alt": "^0.27.0",
"@rocket.chat/prettier-config": "^0.27.0",
"@types/jest": "^26.0.23",
"@rocket.chat/eslint-config-alt": "^0.28.0",
"@rocket.chat/prettier-config": "^0.28.0",
"@types/jest": "^26.0.24",
"downlevel-dts": "^0.7.0",
"eslint": "^7.26.0",
"jest": "^26.6.3",
"eslint": "^7.29.0",
"jest": "^27.0.6",
"lint-staged": "^11.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"prettier": "^2.3.2",
"rimraf": "^3.0.2",
"ts-jest": "^26.5.6",
"typedoc": "^0.20.36",
"typescript": "^4.2.4"
"ts-jest": "^27.0.3",
"typedoc": "^0.21.2",
"typescript": "^4.3.4"
},
"dependencies": {
"tslib": "^2.2.0"
"tslib": "^2.3.0"
},
"gitHead": "c658c7432ff0f8136c85acd31ee83b2594261308"
"gitHead": "2c3a539a2f4519e2e7ae29f2083b4faed855acb6"
}

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

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