should-format
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -229,5 +229,6 @@ var getType = require('should-type'); | ||
['undefined', 'boolean', 'null', 'symbol'].forEach(function(name) { | ||
Formatter.add(name, String); | ||
}); | ||
Formatter.add('undefined', function() { return 'undefined' }); | ||
Formatter.add('null', function() { return 'null' }); | ||
Formatter.add('boolean', function(value) { return value ? 'true': 'false' }); | ||
Formatter.add('symbol', function(value) { return value.toString() }); | ||
@@ -234,0 +235,0 @@ ['number', 'boolean'].forEach(function(name) { |
{ | ||
"name": "should-format", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Formatting of objects for should.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ format |
@@ -35,2 +35,8 @@ /*eslint-env mocha*/ | ||
it('should format Symbols', function() { | ||
if(typeof Symbol != 'undefined' && Symbol.for) { | ||
assert.equal(format(Symbol.for('react.element')), 'Symbol(react.element)') | ||
} | ||
}) | ||
it('should format primitive wrappers', function() { | ||
@@ -37,0 +43,0 @@ assert.equal(format(new Number(10)), 'Number { [[PrimitiveValue]]: 10 }'); |
@@ -0,0 +0,0 @@ function addSpaces(v) { |
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 too big to display
Sorry, the diff of this file is too big to display
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
262294
8969