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

typedconverter

Package Overview
Dependencies
Maintainers
1
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedconverter - npm Package Compare versions

Comparing version 1.0.0-alpha.4 to 1.0.0-alpha.5

5

lib/index.d.ts

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

declare type ConverterMap = [Function | string, Converter];
declare type ConverterMap = {
type: Function | string;
converter: Converter;
};
interface ConversionIssue {

@@ -3,0 +6,0 @@ path: string[];

3

lib/index.js

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

const arrayConverter = (option.guessArrayElement ? DefaultConverters.friendlyArrayConverter : DefaultConverters.strictArrayConverter);
const customConverters = (option.converters || []).map(x => [x.type, x.converter]);
const mergedConverters = new Map([

@@ -177,3 +178,3 @@ [Number, DefaultConverters.numberConverter],

["Model", DefaultConverters.modelConverter],
...option.converters || []
...customConverters
]);

@@ -180,0 +181,0 @@ const [val, err] = convert(value, { path, expectedType: type || option.type, converters: mergedConverters });

{
"name": "typedconverter",
"version": "1.0.0-alpha.4",
"version": "1.0.0-alpha.5",
"description": "Convert object into classes match with TypeScript type annotation",

@@ -5,0 +5,0 @@ "main": "lib/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