Serialize JavaScript to a superset of JSON that includes regular expressions, dates and functions. The code in this package began its life as an internal module to express-state. To expand its usefulness, it now lives as serialize-javascript — an independent package on npm. A primary feature of this package is to serialize code to a string of literal JavaScript which can be embedded in an HTML document by adding it as the contents of the script element. In order to make this safe, HTML characters and JavaScript line terminators are escaped automatically.

Features

  • Automatic Escaping of HTML Characters
  • This module is also great for communicating between node processes.
  • This software is free to use under the Yahoo! Inc. BSD license
  • HTML characters and JavaScript line terminators are escaped automatically
  • The string returned from this package's single export function is literal JavaScript

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

BSD License

Follow Serialize JavaScript

Serialize JavaScript Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Serialize JavaScript!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript JSON Software

Registered

2023-10-10