Socket
Socket
Sign inDemoInstall

@ethercast/model

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethercast/model - npm Package Compare versions

Comparing version 0.0.1 to 0.0.4

14

dist/lib/ethercast-models.js
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -29,3 +37,3 @@ var Joi = require("joi");

miner: address.required(),
mixHash: hex.required(),
mixHash: hex,
nonce: hex.required(),

@@ -100,4 +108,4 @@ number: hex.required(),

exports.mustBeValidTransactionReceipt = mustBeValidTransactionReceipt;
function validate(item, schema) {
var _a = schema.validate(item, { allowUnknown: false, convert: false }), error = _a.error, value = _a.value;
function validate(item, schema, options) {
var _a = schema.validate(item, __assign({ allowUnknown: true, convert: false }, options)), error = _a.error, value = _a.value;
if (error && error.details && error.details.length > 0) {

@@ -104,0 +112,0 @@ throw new Error('schema validation failed: ' + error.message);

import * as Joi from 'joi';
import { ValidationOptions } from 'joi';
import BigNumber from 'bignumber.js';

@@ -41,3 +42,3 @@ export interface Log {

miner: string;
mixHash: string;
mixHash?: string;
nonce: string;

@@ -92,2 +93,2 @@ number: string;

export declare function mustBeValidTransactionReceipt(transactionReceipt: TransactionReceipt): TransactionReceipt;
export declare function validate<T>(item: T, schema: Joi.Schema): T;
export declare function validate<T>(item: T, schema: Joi.Schema, options?: ValidationOptions): T;
{
"name": "@ethercast/model",
"version": "0.0.1",
"version": "0.0.4",
"description": "models for ethercast.io",

@@ -22,3 +22,2 @@ "keywords": [],

"scripts": {
"lint": "tslint -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
"prebuild": "rimraf dist",

@@ -28,3 +27,3 @@ "build": "tsc --module commonjs",

"test:watch": "jest --watch",
"test:prod": "npm run lint && npm run test -- --coverage --no-cache",
"test:prod": "npm run test -- --coverage --no-cache",
"deploy-docs": "ts-node tools/gh-pages-publish",

@@ -34,11 +33,4 @@ "report-coverage": "cat ./coverage/lcov.info | coveralls",

"semantic-release": "semantic-release",
"semantic-release-prepare": "ts-node tools/semantic-release-prepare",
"precommit": "lint-staged"
"semantic-release-prepare": "ts-node tools/semantic-release-prepare"
},
"lint-staged": {
"{src,test}/**/*.ts": [
"prettier --write --no-semi --single-quote",
"git add"
]
},
"config": {

@@ -88,3 +80,2 @@ "commitizen": {

"jest": "^22.0.2",
"lint-staged": "^7.0.0",
"lodash.camelcase": "^4.3.0",

@@ -98,5 +89,2 @@ "prettier": "^1.4.4",

"ts-node": "^4.1.0",
"tslint": "^5.8.0",
"tslint-config-prettier": "^1.1.0",
"tslint-config-standard": "^7.0.0",
"typedoc": "^0.10.0",

@@ -103,0 +91,0 @@ "typescript": "^2.6.2",

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