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

@celo/base

Package Overview
Dependencies
Maintainers
17
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@celo/base - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

CHANGELOG.md

1

lib/index.d.ts

@@ -15,4 +15,5 @@ export * from './account';

export * from './phoneNumbers';
export * from './result';
export * from './signatureUtils';
export * from './string';
export * from './task';

@@ -20,2 +20,3 @@ "use strict";

__export(require("./phoneNumbers"));
__export(require("./result"));
__export(require("./signatureUtils"));

@@ -22,0 +23,0 @@ __export(require("./string"));

@@ -22,1 +22,7 @@ export interface OkResult<TResult> {

}
export declare const JSONParseErrorType = "JsonParseError";
export declare class JSONParseError extends RootError<string> {
readonly error: Error;
constructor(error: Error);
}
export declare function parseJsonAsResult(data: string): OkResult<any> | ErrorResult<JSONParseError>;

@@ -116,2 +116,23 @@ "use strict";

exports.RootError = RootError;
exports.JSONParseErrorType = 'JsonParseError';
// tslint:disable-next-line:max-classes-per-file
var JSONParseError = /** @class */ (function (_super) {
__extends(JSONParseError, _super);
function JSONParseError(error) {
var _this = _super.call(this, exports.JSONParseErrorType) || this;
_this.error = error;
return _this;
}
return JSONParseError;
}(RootError));
exports.JSONParseError = JSONParseError;
function parseJsonAsResult(data) {
try {
return exports.Ok(JSON.parse(data));
}
catch (error) {
return exports.Err(new JSONParseError(error));
}
}
exports.parseJsonAsResult = parseJsonAsResult;
//# sourceMappingURL=result.js.map

2

package.json
{
"name": "@celo/base",
"version": "0.0.3",
"version": "0.0.4",
"description": "Celo base common utils, no dependencies",

@@ -5,0 +5,0 @@ "author": "Celo",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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