Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libskynet

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libskynet - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

4

dist/stringify.d.ts

@@ -0,2 +1,4 @@

import { error } from "./types.js";
declare function tryStringify(obj: any): string;
export { tryStringify };
declare function jsonStringify(obj: any): [string, error];
export { jsonStringify, tryStringify };

@@ -0,1 +1,2 @@

import { addContextToErr } from "./err.js";
// tryStringify will try to turn the provided input into a string. If the input

@@ -25,2 +26,13 @@ // object is already a string, the input object will be returned. If the input

}
export { tryStringify };
// jsonStringify is a replacement for JSON.stringify that returns an error
// rather than throwing.
function jsonStringify(obj) {
try {
let str = JSON.stringify(obj);
return [str, null];
}
catch (err) {
return ["", addContextToErr(tryStringify(err), "unable to stringify object")];
}
}
export { jsonStringify, tryStringify };
{
"name": "libskynet",
"version": "0.0.8",
"version": "0.0.9",
"description": "helper library to interact with skynet's low level primitives",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc