New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

string2js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string2js

Create Javascript objects and primitives from their string representation

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
60
500%
Maintainers
1
Weekly downloads
 
Created
Source

string2js

Create Javascript objects and primitives from their string representation

This module expose a function to convert string values to Javascript objects. It also offer a reviver() function to be used with JSON.parse().

RegExp

The module allow to reviver RegExp objects. To serialize them automatically as JSON, just add the next snippet to the begining of your code:

if(RegExp.prototype.toJSON === undefined)
   RegExp.prototype.toJSON = RegExp.prototype.toString

Keywords

reviver

FAQs

Package last updated on 20 Apr 2018

Did you know?

Socket

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.

Install

Related posts