quick-format-unescaped
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -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'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9465