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

@faast/ts-common

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@faast/ts-common - npm Package Compare versions

Comparing version 0.5.6 to 0.6.0

2

dist/lib/types/BigNumber.d.ts
import * as t from 'io-ts';
import BigNumber from 'bignumber.js';
declare class BigNumberType extends t.Type<BigNumber> {
declare class BigNumberType extends t.Type<BigNumber, string> {
readonly _tag: 'BigNumberType';

@@ -5,0 +5,0 @@ constructor();

@@ -24,3 +24,3 @@ import * as t from 'io-ts';

}
}, t.identity);
}, u => u.toString());
this._tag = 'BigNumberType';

@@ -27,0 +27,0 @@ }

import BigNumber from 'bignumber.js';
import { Numeric } from '../types';
export declare function isMatchingError(e: Error, partialMessages: string[]): boolean;
export declare function toBigNumber(value: Numeric): BigNumber;

@@ -4,0 +5,0 @@ export declare function toBigNumber(value: Numeric | null): BigNumber | null;

import BigNumber from 'bignumber.js';
import { isNil } from '../guards';
export function isMatchingError(e, partialMessages) {
const messageLower = e.toString().toLowerCase();
return partialMessages.some(pm => messageLower.includes(pm.toLowerCase()));
}
export function toBigNumber(value) {

@@ -4,0 +8,0 @@ if (isNil(value)) {

@@ -5,4 +5,4 @@ import { ValidationError, Type } from 'io-ts';

export declare const SimpleReporter: Reporter<Array<string>>;
export declare function assertType<T>(typeCodec: Type<T>, value: unknown, description?: string, ErrorType?: {
export declare function assertType<T>(typeCodec: Type<T, any, unknown>, value: unknown, description?: string, ErrorType?: {
new (message: string): Error;
}): T;
{
"name": "@faast/ts-common",
"version": "0.5.6",
"version": "0.6.0",
"description": "Common typescript types and utils used by faast",

@@ -5,0 +5,0 @@ "license": "MIT",

import * as t from 'io-ts'
import BigNumber from 'bignumber.js'
class BigNumberType extends t.Type<BigNumber> {
class BigNumberType extends t.Type<BigNumber, string> {
readonly _tag: 'BigNumberType' = 'BigNumberType'

@@ -26,3 +26,3 @@ constructor() {

},
t.identity,
u => u.toString(),
)

@@ -29,0 +29,0 @@ }

@@ -5,2 +5,7 @@ import BigNumber from 'bignumber.js'

export function isMatchingError(e: Error, partialMessages: string[]) {
const messageLower = e.toString().toLowerCase()
return partialMessages.some(pm => messageLower.includes(pm.toLowerCase()))
}
export function toBigNumber(value: Numeric): BigNumber

@@ -7,0 +12,0 @@ export function toBigNumber(value: Numeric | null): BigNumber | null

@@ -66,3 +66,3 @@ import { Context, ValidationError, UnionType, IntersectionType, Type, PartialType, Decoder } from 'io-ts'

export function assertType<T>(
typeCodec: Type<T>,
typeCodec: Type<T, any, unknown>,
value: unknown,

@@ -69,0 +69,0 @@ description: string = 'type',

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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