Use === instead of == and !== instead of != as the latter may cause unexpected type coercion [source].
TextEncoder only supports utf-8 and does not accept any input params [source]. So we should declare it like TextEncoder instead of TextEncoder('utf-8').
Use const/let instead of var where appropriate.
Remove stringify-object as it is unused because pretty is unused.
In this PR:
===
instead of==
and!==
instead of!=
as the latter may cause unexpected type coercion [source].TextEncoder
only supportsutf-8
and does not accept any input params [source]. So we should declare it likeTextEncoder
instead ofTextEncoder('utf-8')
.const
/let
instead ofvar
where appropriate.stringify-object
as it is unused becausepretty
is unused.