Please
reach out
if you're looking for a Node.js API or CLI engineer (11 years of experience).
Most recently I have been Netlify Build's
and Netlify Plugins'
technical lead for 2.5 years. I am available for full-time remote positions.
Resolving properties which would change value with
JSON.stringify()
This never throws.
Options
Object with the following properties.
maxSize
Type: number Default: 1e7
Big JSON strings can make a process, filesystem operation or network request
crash. maxSize prevents it by setting a maximum
JSON.stringify(value).length.
Additional properties beyond the size limit are omitted. They are
completely removed, not truncated (including strings).
If false, object/array properties are processed recursively. Please note that
cycles are not removed when this is true.
Return value
Object with the following properties.
value
Type: any
Copy of the input value after applying all the changes to make
it JSON-safe.
The top-level value itself might be changed (including to undefined) if it
is either invalid JSON or has a toJSON() method.
The value is not serialized to a JSON string. This allows choosing the
serialization format (JSON, YAML, etc.), processing the value, etc.
changes
Type: Change[]
List of changes applied to value. Each item is an
individual change to a specific property. A given property might have multiple
changes, listed in order.
changes[*].path
Type: Array<string | symbol | number>
Property path.
changes[*].oldValue
Type: any
Property value before the change.
changes[*].newValue
Type: any
Property value after the change. undefined means the property was omitted.
The npm package safe-json-value receives a total of 2,694 weekly downloads. As such, safe-json-value popularity was classified as popular.
We found that safe-json-value demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 28 Oct 2023
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Socket researchers found a malicious Maven package impersonating the legitimate ‘XZ for Java’ library, introducing a backdoor for remote code execution.
Node.js v22.12.0 (LTS) debuts with require(esm) enabled by default, alongside security milestones and automated workflows for faster, more stable releases.