🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

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');