Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 16, 2024 via pnpm

serialize-javascript 1.6.0

Serialize JavaScript to a superset of JSON that includes regular expressions and functions.
Package summary
Share
4
issues
2
high severity
vulnerability
2
2
moderate severity
vulnerability
2
1
license
1
BSD-3-Clause
Package created
16 Sep 2014
Version published
24 Dec 2018
Maintainers
3
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

4

2 high severity issues

high
Recommendation: Upgrade to version 3.1.0 or later
via: serialize-javascript@1.6.0
Recommendation: Upgrade to version 3.1.0 or later
via: serialize-javascript@1.6.0
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Upgrade to version 2.1.1 or later
via: serialize-javascript@1.6.0
Recommendation: Upgrade to version 2.1.1 or later
via: serialize-javascript@1.6.0
Collapse
Expand

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
serialize-javascript@1.6.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of serialize-javascript 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does serialize-javascript do?

Serialize-javascript is a powerful npm package that converts JavaScript to a superset of JSON that includes regular expressions, functions, dates, sets, and maps. Its initial creation was as an internal module to express-state. However, due to its wide range of applicability, it now exists as serialize-javascript, a standalone package on npm. This tool allows seamless serialization of JavaScript on both the server and client sides and can be especially efficient for web applications using client-side URL routing.

How do you use serialize-javascript?

To use serialize-javascript, firstly, install the package using npm by running npm install serialize-javascript in your terminal. Once installed, import it in your JavaScript file with var serialize = require('serialize-javascript');. Then you can simply call serialize() function on your JavaScript object.

Example usage:

var serialize = require('serialize-javascript');

serialize({
    str  : 'string',
    num  : 0,
    obj  : {foo: 'foo'},
    arr  : [1, 2, 3],
    bool : true,
    nil  : null,
    undef: undefined,
    inf  : Infinity,
    date : new Date("Thu, 28 Apr 2016 22:02:17 GMT"),
    map  : new Map([['hello', 'world']]),
    set  : new Set([123, 456]),
    fn   : function echo(arg) { return arg; },
    re   : /([^\s]+)/g,
    big  : BigInt(10),
});

Where are the serialize-javascript docs?

The documentation for serialize-javascript can be found in the README file on the GitHub repository at git+https://github.com/yahoo/serialize-javascript.git. The README file is highly informative and contains a comprehensive guide on installation, usage, available options, and deserialization process.