
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@stdlib/complex-reviver-float64
Advanced tools
Revive a JSON-serialized 128-bit complex number.
npm install @stdlib/complex-reviver-float64
var reviver = require( '@stdlib/complex-reviver-float64' );
Revives a JSON-serialized 128-bit complex number.
var parseJSON = require( '@stdlib/utils-parse-json' );
var str = '{"type":"Complex128","re":5,"im":3}';
var z = parseJSON( str, reviver );
// returns <Complex128>
For details on the JSON serialization format, see Complex128.
var Complex128 = require( '@stdlib/complex-float64' );
var parseJSON = require( '@stdlib/utils-parse-json' );
var reviver = require( '@stdlib/complex-reviver-float64' );
var z = new Complex128( 5.0, 3.0 );
var str = JSON.stringify( z );
// returns '{"type":"Complex128","re":5,"im":3}'
var w = parseJSON( str, reviver );
if ( w instanceof Error ) {
throw w;
}
var bool = ( w instanceof z.constructor );
// returns true
bool = ( w.re === z.re );
// returns true
bool = ( w.im === z.im );
// returns true
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2021. The Stdlib Authors.
FAQs
Revive a JSON-serialized 128-bit complex number.
The npm package @stdlib/complex-reviver-float64 receives a total of 6 weekly downloads. As such, @stdlib/complex-reviver-float64 popularity was classified as not popular.
We found that @stdlib/complex-reviver-float64 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
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.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.