Skip to content

Instantly share code, notes, and snippets.

@getify

getify/grid.js

Last active Aug 29, 2015
Embed
What would you like to do?
function formatValue(x) {
var ret;
if (typeof x == "string") {
return "'" + x.replace(/\n/g,"\\n") + "'";
}
if (typeof x == "number" && x === 0 && (1/x === -Infinity)) {
return "-0";
}
if (Array.isArray(x)) {
return "[" + x.map(formatValue).join(",") + "]";
}
if (x !== null && typeof x == "object") {
return "{" + Object.keys(x).reduce(function(r,k){
if (k != "toString" && k != "valueOf") {
r.push(k + ":" + formatValue(x[k]));
}
return r;
},[]).join(",") + "}";
}
return String(x);
}
var objsymbolkey = {};
objsymbolkey[Symbol("")] = null;
var vals = [
[0,"0"],
[.0,".0"],
[-0,"-0"],
[NaN,"NaN"],
["","''"],
[" ","' '"],
["\n\n","'\\n\\n'"],
[null,"null"],
[undefined,"undefined"],
[true,"true"],
[false,"false"],
[/ /,"/ /"],
[Infinity,"Infinity"],
[-Infinity,"-Infinity"],
["Infinity","'Infinity'"],
["-Infinity","'-Infinity'"],
[function(){},"function(){}"],
[Symbol(""),"Symbol('')"],
[[],"[]"],
[[0],"[0]"],
[[.0],"[.0]"],
[[-0],"[-0]"],
[[NaN],"[NaN]"],
[[""],"['']"],
[[" "],"[' ']"],
[["\n\n"],"['\\n\\n']"],
[[null],"[null]"],
[[undefined],"[undefined]"],
[[false],"[false]"],
[[true],"[true]"],
[[/ /],"[\/ \/]"],
[[,],"[,]"],
[[[]],"[[]]"],
[[Infinity],"[Infinity]"],
[[-Infinity],"[-Infinity]"],
[["Infinity"],"['Infinity']"],
[["-Infinity"],"['-Infinity']"],
[[function(){}],"[function(){}]"],
[[Symbol("")],"[Symbol('')]"],
[{},"{}"],
[Object.create(null),"Object.create(null)"],
[{"":null},"{'':null}"],
[{"":undefined},"{'':undefined}"],
[{"":function(){}},"{'':function(){}}"],
[{" ":null},"{' ':null}"],
[{"\n\n":null},"{'\\n\\n':null}"],
[objsymbolkey,"{Symbol(''):null}"],
[{toString:function(){return 0}},"{ toString: 0 }"],
[{toString:function(){return .0}},"{ toString: .0 }"],
[{toString:function(){return -0}},"{ toString: -0 }"],
[{toString:function(){return NaN}},"{ toString: NaN }"],
[{toString:function(){return ""}},"{ toString: '' }"],
[{toString:function(){return " "}},"{ toString: ' ' }"],
[{toString:function(){return "\n\n"}},"{ toString: '\\n\\n' }"],
[{toString:function(){return null}},"{ toString: null }"],
[{toString:function(){return undefined}},"{ toString: undefined }"],
[{toString:function(){return false}},"{ toString: false }"],
[{toString:function(){return true}},"{ toString: true }"],
[{toString:function(){return []}},"{ toString: [] }"],
[{toString:function(){return {}}},"{ toString: {} }"],
[{toString:function(){return / /}},"{ toString: / / }"],
[{toString:function(){return Infinity}},"{ toString: Infinity }"],
[{toString:function(){return -Infinity}},"{ toString: -Infinity }"],
[{toString:function(){return "Infinity"}},"{ toString: 'Infinity' }"],
[{toString:function(){return "-Infinity"}},"{ toString: '-Infinity' }"],
[{toString:function(){return function(){}}},"{ toString: function(){} }"],
[{toString:function(){return Symbol("")}},"{ toString: Symbol('') }"],
[{toString:function(){return 0},valueOf:function(){return{}}},"{ toString: 0, valueOf: {} }"],
[{toString:function(){return .0},valueOf:function(){return{}}},"{ toString: .0, valueOf: {} }"],
[{toString:function(){return -0},valueOf:function(){return{}}},"{ toString: -0, valueOf: {} }"],
[{toString:function(){return NaN},valueOf:function(){return{}}},"{ toString: NaN, valueOf: {} }"],
[{toString:function(){return ""},valueOf:function(){return{}}},"{ toString: '', valueOf: {} }"],
[{toString:function(){return " "},valueOf:function(){return{}}},"{ toString: ' ', valueOf: {} }"],
[{toString:function(){return "\n\n"},valueOf:function(){return{}}},"{ toString: '\\n\\n', valueOf: {} }"],
[{toString:function(){return null},valueOf:function(){return{}}},"{ toString: null, valueOf: {} }"],
[{toString:function(){return undefined},valueOf:function(){return{}}},"{ toString: undefined, valueOf: {} }"],
[{toString:function(){return false},valueOf:function(){return{}}},"{ toString: false, valueOf: {} }"],
[{toString:function(){return true},valueOf:function(){return{}}},"{ toString: true, valueOf: {} }"],
[{toString:function(){return []},valueOf:function(){return{}}},"{ toString: [], valueOf: {} }"],
[{toString:function(){return {}},valueOf:function(){return{}}},"{ toString: {}, valueOf: {} }"],
[{toString:function(){return / /},valueOf:function(){return{}}},"{ toString: / /, valueOf: {} }"],
[{toString:function(){return Infinity},valueOf:function(){return{}}},"{ toString: Infinity, valueOf: {} }"],
[{toString:function(){return -Infinity},valueOf:function(){return{}}},"{ toString: -Infinity, valueOf: {} }"],
[{toString:function(){return "Infinity"},valueOf:function(){return{}}},"{ toString: 'Infinity', valueOf: {} }"],
[{toString:function(){return "-Infinity"},valueOf:function(){return{}}},"{ toString: '-Infinity', valueOf: {} }"],
[{toString:function(){return function(){}},valueOf:function(){return{}}},"{ toString: function(){}, valueOf: {} }"],
[{toString:function(){return Symbol("")},valueOf:function(){return{}}},"{ toString: Symbol(''), valueOf: {} }"],
[{toString:function(){return NaN},valueOf:function(){return Infinity}}," { toString: NaN, valueOf: Infinity }"],
[{valueOf:function(){return 0}},"{ valueOf: 0 }"],
[{valueOf:function(){return .0}},"{ valueOf: .0 }"],
[{valueOf:function(){return -0}},"{ valueOf: -0 }"],
[{valueOf:function(){return NaN}},"{ valueOf: NaN }"],
[{valueOf:function(){return ""}},"{ valueOf: '' }"],
[{valueOf:function(){return " "}},"{ valueOf: ' ' }"],
[{valueOf:function(){return "\n\n"}},"{ valueOf: '\\n\\n' }"],
[{valueOf:function(){return null}},"{ valueOf: null }"],
[{valueOf:function(){return undefined}},"{ valueOf: undefined }"],
[{valueOf:function(){return false}},"{ valueOf: false }"],
[{valueOf:function(){return true}},"{ valueOf: true }"],
[{valueOf:function(){return []}},"{ valueOf: [] }"],
[{valueOf:function(){return {}}},"{ valueOf: {} }"],
[{valueOf:function(){return / /}},"{ valueOf: / / }"],
[{valueOf:function(){return Infinity}},"{ valueOf: Infinity }"],
[{valueOf:function(){return -Infinity}},"{ valueOf: -Infinity }"],
[{valueOf:function(){return "Infinity"}},"{ valueOf: 'Infinity' }"],
[{valueOf:function(){return "-Infinity"}},"{ valueOf: '-Infinity' }"],
[{valueOf:function(){return function(){}}},"{ valueOf: function(){} }"],
[{valueOf:function(){return Symbol("")}},"{ valueOf: Symbol('') }"],
[{valueOf:function(){return 0},toString:function(){return ""}},"{ valueOf: 0, toString: '' }"],
[{valueOf:function(){return .0},toString:function(){return ""}},"{ valueOf: .0, toString: '' }"],
[{valueOf:function(){return -0},toString:function(){return ""}},"{ valueOf: -0, toString: '' }"],
[{valueOf:function(){return NaN},toString:function(){return ""}},"{ valueOf: NaN, toString: '' }"],
[{valueOf:function(){return ""},toString:function(){return ""}},"{ valueOf: '', toString: '' }"],
[{valueOf:function(){return " "},toString:function(){return " "}},"{ valueOf: ' ', toString: ' ' }"],
[{valueOf:function(){return "\n\n"},toString:function(){return "\n\n"}},"{ valueOf: '\\n\\n', toString: '\\n\\n' }"],
[{valueOf:function(){return null},toString:function(){return ""}},"{ valueOf: null, toString: '' }"],
[{valueOf:function(){return undefined},toString:function(){return ""}},"{ valueOf: undefined, toString: '' }"],
[{valueOf:function(){return false},toString:function(){return ""}},"{ valueOf: false, toString: '' }"],
[{valueOf:function(){return true},toString:function(){return ""}},"{ valueOf: true, toString: '' }"],
[{valueOf:function(){return []},toString:function(){return ""}},"{ valueOf: [], toString: '' }"],
[{valueOf:function(){return {}},toString:function(){return ""}},"{ valueOf: {}, toString: '' }"],
[{valueOf:function(){return / /},toString:function(){return ""}},"{ valueOf: / /, toString: '' }"],
[{valueOf:function(){return Infinity},toString:function(){return ""}},"{ valueOf: Infinity, toString: '' }"],
[{valueOf:function(){return -Infinity},toString:function(){return ""}},"{ valueOf: -Infinity, toString: '' }"],
[{valueOf:function(){return "Infinity"},toString:function(){return "Infinity"}},"{ valueOf: 'Infinity', toString: 'Infinity' }"],
[{valueOf:function(){return "-Infinity"},toString:function(){return "-Infinity"}},"{ valueOf: '-Infinity', toString: '-Infinity' }"],
[{valueOf:function(){return function(){}},toString:function(){return function(){}}},"{ valueOf: function(){}, toString: function(){} }"],
[{valueOf:function(){return Symbol("")},toString:function(){return Symbol("")}},"{ valueOf: Symbol(''), toString: Symbol('') }"],
];
var coercions = [
[function(x){ return String(x); },"String(x)"],
[function(x){ return x + ""; },"x + ''"],
[function(x){ return JSON.stringify(x); },"JSON.stringify(x)"],
[function(x){ return x.toString(); },"x.toString()"],
[function(x){ return {}.toString.call(x); },"{}.toString.call(x)"],
[function(x){ return Number(x); },"Number(x), +x"],
[function(x){ return x + 0; },"x + 0"],
[function(x){ return x * 1; },"x * 1"],
[function(x){ return x | 0; },"x | 0"],
[function(x){ return ~~x; },"~~x"],
[function(x){ return x >>> 0; },"x >>> 0"],
[function(x){ return Boolean(x); },"Boolean(x) , !!x"],
];
var table = [];
// construct top row labels
table[0] = [""];
table[0] = table[0].concat(
coercions.map(function(f){
return f[1];
})
);
table = table.concat(
vals.map(function(v){
return [v[1]].concat(
coercions.map(function(f,x){
try {
x = f[0](v[0]);
}
catch (e) { return "__"; }
return formatValue(x);
})
);
})
);
console.table( table );
String(x) x + '' JSON.stringify(x) x.toString() {}.toString.call(x) Number(x), +x x + 0 x * 1 x | 0 ~~x x >>> 0 Boolean(x) , !!x
0 '0' '0' '0' '0' '[object Number]' 0 0 0 0 0 0 false
.0 '0' '0' '0' '0' '[object Number]' 0 0 0 0 0 0 false
-0 '0' '0' '0' '0' '[object Number]' -0 0 -0 0 0 0 false
NaN 'NaN' 'NaN' 'null' 'NaN' '[object Number]' NaN NaN NaN 0 0 0 false
'' '' '' '""' '' '[object String]' 0 '0' 0 0 0 0 false
' ' ' ' ' ' '" "' ' ' '[object String]' 0 ' 0' 0 0 0 0 true
'\n\n' '\n\n' '\n\n' '"\n\n"' '\n\n' '[object String]' 0 '\n\n0' 0 0 0 0 true
null 'null' 'null' 'null' __ '[object Null]' 0 0 0 0 0 0 false
undefined 'undefined' 'undefined' undefined __ '[object Undefined]' NaN NaN NaN 0 0 0 false
true 'true' 'true' 'true' 'true' '[object Boolean]' 1 1 1 1 1 1 true
false 'false' 'false' 'false' 'false' '[object Boolean]' 0 0 0 0 0 0 false
/ / '/ /' '/ /' '{}' '/ /' '[object RegExp]' NaN '/ /0' NaN 0 0 0 true
Infinity 'Infinity' 'Infinity' 'null' 'Infinity' '[object Number]' Infinity Infinity Infinity 0 0 0 true
-Infinity '-Infinity' '-Infinity' 'null' '-Infinity' '[object Number]' -Infinity -Infinity -Infinity 0 0 0 true
'Infinity' 'Infinity' 'Infinity' '"Infinity"' 'Infinity' '[object String]' Infinity 'Infinity0' Infinity 0 0 0 true
'-Infinity' '-Infinity' '-Infinity' '"-Infinity"' '-Infinity' '[object String]' -Infinity '-Infinity0' -Infinity 0 0 0 true
function(){} 'function (){}' 'function (){}' undefined 'function (){}' '[object Function]' NaN 'function (){}0' NaN 0 0 0 true
Symbol('') 'Symbol()' __ undefined 'Symbol()' '[object Symbol]' __ __ __ __ __ __ true
[] '' '' '[]' '' '[object Array]' 0 '0' 0 0 0 0 true
[0] '0' '0' '[0]' '0' '[object Array]' 0 '00' 0 0 0 0 true
[.0] '0' '0' '[0]' '0' '[object Array]' 0 '00' 0 0 0 0 true
[-0] '0' '0' '[0]' '0' '[object Array]' 0 '00' 0 0 0 0 true
[NaN] 'NaN' 'NaN' '[null]' 'NaN' '[object Array]' NaN 'NaN0' NaN 0 0 0 true
[''] '' '' '[""]' '' '[object Array]' 0 '0' 0 0 0 0 true
[' '] ' ' ' ' '[" "]' ' ' '[object Array]' 0 ' 0' 0 0 0 0 true
['\n\n'] '\n\n' '\n\n' '["\n\n"]' '\n\n' '[object Array]' 0 '\n\n0' 0 0 0 0 true
[null] '' '' '[null]' '' '[object Array]' 0 '0' 0 0 0 0 true
[undefined] '' '' '[null]' '' '[object Array]' 0 '0' 0 0 0 0 true
[false] 'false' 'false' '[false]' 'false' '[object Array]' NaN 'false0' NaN 0 0 0 true
[true] 'true' 'true' '[true]' 'true' '[object Array]' NaN 'true0' NaN 0 0 0 true
[/ /] '/ /' '/ /' '[{}]' '/ /' '[object Array]' NaN '/ /0' NaN 0 0 0 true
[,] '' '' '[null]' '' '[object Array]' 0 '0' 0 0 0 0 true
[[]] '' '' '[[]]' '' '[object Array]' 0 '0' 0 0 0 0 true
[Infinity] 'Infinity' 'Infinity' '[null]' 'Infinity' '[object Array]' Infinity 'Infinity0' Infinity 0 0 0 true
[-Infinity] '-Infinity' '-Infinity' '[null]' '-Infinity' '[object Array]' -Infinity '-Infinity0' -Infinity 0 0 0 true
['Infinity'] 'Infinity' 'Infinity' '["Infinity"]' 'Infinity' '[object Array]' Infinity 'Infinity0' Infinity 0 0 0 true
['-Infinity'] '-Infinity' '-Infinity' '["-Infinity"]' '-Infinity' '[object Array]' -Infinity '-Infinity0' -Infinity 0 0 0 true
[function(){}] 'function (){}' 'function (){}' '[null]' 'function (){}' '[object Array]' NaN 'function (){}0' NaN 0 0 0 true
[Symbol('')] 'Symbol()' 'Symbol()' '[null]' 'Symbol()' '[object Array]' NaN 'Symbol()0' NaN 0 0 0 true
{} '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
Object.create(null) __ __ '{}' __ '[object Object]' __ __ __ __ __ __ true
{'':null} '[object Object]' '[object Object]' '{"":null}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{'':undefined} '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{'':function(){}} '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{' ':null} '[object Object]' '[object Object]' '{" ":null}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{'\n\n':null} '[object Object]' '[object Object]' '{"\n\n":null}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{Symbol(''):null} '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{ toString: 0 } '0' '0' '{}' 0 '[object Object]' 0 0 0 0 0 0 true
{ toString: .0 } '0' '0' '{}' 0 '[object Object]' 0 0 0 0 0 0 true
{ toString: -0 } '0' '0' '{}' -0 '[object Object]' -0 0 -0 0 0 0 true
{ toString: NaN } 'NaN' 'NaN' '{}' NaN '[object Object]' NaN NaN NaN 0 0 0 true
{ toString: '' } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ toString: ' ' } ' ' ' ' '{}' ' ' '[object Object]' 0 ' 0' 0 0 0 0 true
{ toString: '\n\n' } '\n\n' '\n\n' '{}' '\n\n' '[object Object]' 0 '\n\n0' 0 0 0 0 true
{ toString: null } 'null' 'null' '{}' null '[object Object]' 0 0 0 0 0 0 true
{ toString: undefined } 'undefined' 'undefined' '{}' undefined '[object Object]' NaN NaN NaN 0 0 0 true
{ toString: false } 'false' 'false' '{}' false '[object Object]' 0 0 0 0 0 0 true
{ toString: true } 'true' 'true' '{}' true '[object Object]' 1 1 1 1 1 1 true
{ toString: [] } __ __ '{}' [] '[object Object]' __ __ __ __ __ __ true
{ toString: {} } __ __ '{}' {} '[object Object]' __ __ __ __ __ __ true
{ toString: / / } __ __ '{}' {} '[object Object]' __ __ __ __ __ __ true
{ toString: Infinity } 'Infinity' 'Infinity' '{}' Infinity '[object Object]' Infinity Infinity Infinity 0 0 0 true
{ toString: -Infinity } '-Infinity' '-Infinity' '{}' -Infinity '[object Object]' -Infinity -Infinity -Infinity 0 0 0 true
{ toString: 'Infinity' } 'Infinity' 'Infinity' '{}' 'Infinity' '[object Object]' Infinity 'Infinity0' Infinity 0 0 0 true
{ toString: '-Infinity' } '-Infinity' '-Infinity' '{}' '-Infinity' '[object Object]' -Infinity '-Infinity0' -Infinity 0 0 0 true
{ toString: function(){} } __ __ '{}' function (){} '[object Object]' __ __ __ __ __ __ true
{ toString: Symbol('') } __ __ '{}' Symbol() '[object Object]' __ __ __ __ __ __ true
{ toString: 0, valueOf: {} } '0' '0' '{}' 0 '[object Object]' 0 0 0 0 0 0 true
{ toString: .0, valueOf: {} } '0' '0' '{}' 0 '[object Object]' 0 0 0 0 0 0 true
{ toString: -0, valueOf: {} } '0' '0' '{}' -0 '[object Object]' -0 0 -0 0 0 0 true
{ toString: NaN, valueOf: {} } 'NaN' 'NaN' '{}' NaN '[object Object]' NaN NaN NaN 0 0 0 true
{ toString: '', valueOf: {} } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ toString: ' ', valueOf: {} } ' ' ' ' '{}' ' ' '[object Object]' 0 ' 0' 0 0 0 0 true
{ toString: '\n\n', valueOf: {} } '\n\n' '\n\n' '{}' '\n\n' '[object Object]' 0 '\n\n0' 0 0 0 0 true
{ toString: null, valueOf: {} } 'null' 'null' '{}' null '[object Object]' 0 0 0 0 0 0 true
{ toString: undefined, valueOf: {} } 'undefined' 'undefined' '{}' undefined '[object Object]' NaN NaN NaN 0 0 0 true
{ toString: false, valueOf: {} } 'false' 'false' '{}' false '[object Object]' 0 0 0 0 0 0 true
{ toString: true, valueOf: {} } 'true' 'true' '{}' true '[object Object]' 1 1 1 1 1 1 true
{ toString: [], valueOf: {} } __ __ '{}' [] '[object Object]' __ __ __ __ __ __ true
{ toString: {}, valueOf: {} } __ __ '{}' {} '[object Object]' __ __ __ __ __ __ true
{ toString: / /, valueOf: {} } __ __ '{}' {} '[object Object]' __ __ __ __ __ __ true
{ toString: Infinity, valueOf: {} } 'Infinity' 'Infinity' '{}' Infinity '[object Object]' Infinity Infinity Infinity 0 0 0 true
{ toString: -Infinity, valueOf: {} } '-Infinity' '-Infinity' '{}' -Infinity '[object Object]' -Infinity -Infinity -Infinity 0 0 0 true
{ toString: 'Infinity', valueOf: {} } 'Infinity' 'Infinity' '{}' 'Infinity' '[object Object]' Infinity 'Infinity0' Infinity 0 0 0 true
{ toString: '-Infinity', valueOf: {} } '-Infinity' '-Infinity' '{}' '-Infinity' '[object Object]' -Infinity '-Infinity0' -Infinity 0 0 0 true
{ toString: function(){}, valueOf: {} } __ __ '{}' function (){} '[object Object]' __ __ __ __ __ __ true
{ toString: Symbol(''), valueOf: {} } __ __ '{}' Symbol() '[object Object]' __ __ __ __ __ __ true
{ toString: NaN, valueOf: Infinity } 'NaN' 'Infinity' '{}' NaN '[object Object]' Infinity Infinity Infinity 0 0 0 true
{ valueOf: 0 } '[object Object]' '0' '{}' '[object Object]' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: .0 } '[object Object]' '0' '{}' '[object Object]' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: -0 } '[object Object]' '0' '{}' '[object Object]' '[object Object]' -0 0 -0 0 0 0 true
{ valueOf: NaN } '[object Object]' 'NaN' '{}' '[object Object]' '[object Object]' NaN NaN NaN 0 0 0 true
{ valueOf: '' } '[object Object]' '' '{}' '[object Object]' '[object Object]' 0 '0' 0 0 0 0 true
{ valueOf: ' ' } '[object Object]' ' ' '{}' '[object Object]' '[object Object]' 0 ' 0' 0 0 0 0 true
{ valueOf: '\n\n' } '[object Object]' '\n\n' '{}' '[object Object]' '[object Object]' 0 '\n\n0' 0 0 0 0 true
{ valueOf: null } '[object Object]' 'null' '{}' '[object Object]' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: undefined } '[object Object]' 'undefined' '{}' '[object Object]' '[object Object]' NaN NaN NaN 0 0 0 true
{ valueOf: false } '[object Object]' 'false' '{}' '[object Object]' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: true } '[object Object]' 'true' '{}' '[object Object]' '[object Object]' 1 1 1 1 1 1 true
{ valueOf: [] } '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{ valueOf: {} } '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{ valueOf: / / } '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{ valueOf: Infinity } '[object Object]' 'Infinity' '{}' '[object Object]' '[object Object]' Infinity Infinity Infinity 0 0 0 true
{ valueOf: -Infinity } '[object Object]' '-Infinity' '{}' '[object Object]' '[object Object]' -Infinity -Infinity -Infinity 0 0 0 true
{ valueOf: 'Infinity' } '[object Object]' 'Infinity' '{}' '[object Object]' '[object Object]' Infinity 'Infinity0' Infinity 0 0 0 true
{ valueOf: '-Infinity' } '[object Object]' '-Infinity' '{}' '[object Object]' '[object Object]' -Infinity '-Infinity0' -Infinity 0 0 0 true
{ valueOf: function(){} } '[object Object]' '[object Object]' '{}' '[object Object]' '[object Object]' NaN '[object Object]0' NaN 0 0 0 true
{ valueOf: Symbol('') } '[object Object]' __ '{}' '[object Object]' '[object Object]' __ __ __ __ __ __ true
{ valueOf: 0, toString: '' } '' '0' '{}' '' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: .0, toString: '' } '' '0' '{}' '' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: -0, toString: '' } '' '0' '{}' '' '[object Object]' -0 0 -0 0 0 0 true
{ valueOf: NaN, toString: '' } '' 'NaN' '{}' '' '[object Object]' NaN NaN NaN 0 0 0 true
{ valueOf: '', toString: '' } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ valueOf: ' ', toString: ' ' } ' ' ' ' '{}' ' ' '[object Object]' 0 ' 0' 0 0 0 0 true
{ valueOf: '\n\n', toString: '\n\n' } '\n\n' '\n\n' '{}' '\n\n' '[object Object]' 0 '\n\n0' 0 0 0 0 true
{ valueOf: null, toString: '' } '' 'null' '{}' '' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: undefined, toString: '' } '' 'undefined' '{}' '' '[object Object]' NaN NaN NaN 0 0 0 true
{ valueOf: false, toString: '' } '' 'false' '{}' '' '[object Object]' 0 0 0 0 0 0 true
{ valueOf: true, toString: '' } '' 'true' '{}' '' '[object Object]' 1 1 1 1 1 1 true
{ valueOf: [], toString: '' } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ valueOf: {}, toString: '' } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ valueOf: / /, toString: '' } '' '' '{}' '' '[object Object]' 0 '0' 0 0 0 0 true
{ valueOf: Infinity, toString: '' } '' 'Infinity' '{}' '' '[object Object]' Infinity Infinity Infinity 0 0 0 true
{ valueOf: -Infinity, toString: '' } '' '-Infinity' '{}' '' '[object Object]' -Infinity -Infinity -Infinity 0 0 0 true
{ valueOf: 'Infinity', toString: 'Infinity' } 'Infinity' 'Infinity' '{}' 'Infinity' '[object Object]' Infinity 'Infinity0' Infinity 0 0 0 true
{ valueOf: '-Infinity', toString: '-Infinity' } '-Infinity' '-Infinity' '{}' '-Infinity' '[object Object]' -Infinity '-Infinity0' -Infinity 0 0 0 true
{ valueOf: function(){}, toString: function(){} } __ __ '{}' function (){} '[object Object]' __ __ __ __ __ __ true
{ valueOf: Symbol(''), toString: Symbol('') } __ __ '{}' Symbol() '[object Object]' __ __ __ __ __ __ true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment