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

quick-format-unescaped

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quick-format-unescaped - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

index.js

@@ -98,3 +98,3 @@ 'use strict'

if (x === null || (typeof x !== 'object')) {
str += ' ' + x
str += ' ' + String(x)
} else {

@@ -101,0 +101,0 @@ str += ' ' + ss(x)

{
"name": "quick-format-unescaped",
"version": "3.0.2",
"version": "3.0.3",
"description": "Solves a problem with util.format",

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

'use strict';
const assert = require('assert');
const format = require('../');
// const symbol = Symbol('foo');

@@ -18,10 +17,11 @@ // assert.equal(format([]), '');

// // ES6 Symbol handling
// // assert.equal(format([symbol]), 'Symbol(foo)');
// // assert.equal(format(['foo', symbol]), 'foo Symbol(foo)');
// // assert.equal(format(['%s', symbol]), 'Symbol(foo)');
// // assert.equal(format(['%j', symbol]), 'undefined');
// // assert.throws(function() {
// // format(['%d', symbol]);
// // }, TypeError);
// ES6 Symbol handling
const symbol = Symbol('foo')
assert.equal(format(null, [symbol]), symbol);
assert.equal(format('foo', [symbol]), 'foo Symbol(foo)');
assert.equal(format('%s', [symbol]), 'Symbol(foo)');
assert.equal(format('%j', [symbol]), 'undefined');
assert.throws(function() {
format(['%d', symbol]);
}, TypeError);

@@ -28,0 +28,0 @@ assert.equal(format('%d', [42.0]), '42');

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