# Node object hash / objectSorter / CoerceOptions
objectSorter.CoerceOptions
Advanced coerce options
• Optional
bigint: boolean
If true
converts BigInt to string
Example
// coerce.bigint = true
1n === '1';
Example
// coerce.bigint = false
1n !== '1';
Default
true;
• Optional
boolean: boolean
If true
converts booleans to string 1
and 0
Example
// coerce.boolean = true
true === 1;
false === '0';
Example
// coerce.boolean = true
true !== 1;
false !== '0';
Default
true;
• Optional
date: boolean
If true
dates may equal the same formatted strings
Example
// coerce.date = true
Example
// coerce.date = false
Default
true;
• Optional
function: boolean
If true
functions may equal the same formatted strings
Example
// coerce.function = true
Example
// coerce.function = false
Default
true;
• Optional
null: boolean
If true
null will be equal to empty string
Example
// coerce.null = true
null === '';
Example
// coerce.null = false
null !== '';
Default
true;
• Optional
number: boolean
If true
converts numbers to strings
Example
// coerce.number = true
1 === '1';
Example
// coerce.number = false
1 !== '1';
Default
true;
• Optional
set: boolean
If true
set will be coerced to array
Example
// coerce.set = true
Example
// coerce.set = false
Default
true;
• Optional
string: boolean
If true
strings and coerced string will be equal to coerced numbers, booleans, etc
Example
// coerce.string = true
'1' === true;
Example
// coerce.string = false
'1' !== 1;
Default
true;
• Optional
symbol: boolean
If true
all symbols will have eual representation
Example
// coerce.symbol = true
Symbol.for('a') === Symbol.for('b');
Example
// coerce.symbol = false
Symbol.for('a') !== Symbol.for('b');
Default
true;
• Optional
undefined: boolean
If true
undefined will be equal to empty string
Example
// coerce.undefined = true
undefined === '';
Example
// coerce.undefined = false
undefined !== '';
Default
true;