Skip to content

Latest commit

 

History

History
338 lines (212 loc) · 4.5 KB

objectSorter.CoerceOptions.md

File metadata and controls

338 lines (212 loc) · 4.5 KB

# Node object hash / objectSorter / CoerceOptions

Interface: CoerceOptions

objectSorter.CoerceOptions

Advanced coerce options

Table of contents

Properties

Properties

bigint

Optional bigint: boolean

If true converts BigInt to string

Example

// coerce.bigint = true
1n === '1';

Example

// coerce.bigint = false
1n !== '1';

Default

true;

Defined in

objectSorter.ts:43


boolean

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;

Defined in

objectSorter.ts:21


date

Optional date: boolean

If true dates may equal the same formatted strings

Example

// coerce.date = true

Example

// coerce.date = false

Default

true;

Defined in

objectSorter.ts:105


function

Optional function: boolean

If true functions may equal the same formatted strings

Example

// coerce.function = true

Example

// coerce.function = false

Default

true;

Defined in

objectSorter.ts:96


null

Optional null: boolean

If true null will be equal to empty string

Example

// coerce.null = true
null === '';

Example

// coerce.null = false
null !== '';

Default

true;

Defined in

objectSorter.ts:76


number

Optional number: boolean

If true converts numbers to strings

Example

// coerce.number = true
1 === '1';

Example

// coerce.number = false
1 !== '1';

Default

true;

Defined in

objectSorter.ts:32


set

Optional set: boolean

If true set will be coerced to array

Example

// coerce.set = true

Example

// coerce.set = false

Default

true;

Defined in

objectSorter.ts:114


string

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;

Defined in

objectSorter.ts:54


symbol

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;

Defined in

objectSorter.ts:87


undefined

Optional undefined: boolean

If true undefined will be equal to empty string

Example

// coerce.undefined = true
undefined === '';

Example

// coerce.undefined = false
undefined !== '';

Default

true;

Defined in

objectSorter.ts:65