New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 2.1.0 to 2.2.0

3

lib/decorators.d.ts

@@ -68,3 +68,3 @@ import validatorJs from "validator";

function multibyte(opt?: Opt): (target: any, name: string, index?: any) => void;
function numeric(opt?: Opt): (target: any, name: string, index?: any) => void;
function numeric(opt?: Opt & validatorJs.IsNumericOptions): (target: any, name: string, index?: any) => void;
function port(opt?: Opt): (target: any, name: string, index?: any) => void;

@@ -74,2 +74,3 @@ function postalCode(opt?: Opt & {

}): (target: any, name: string, index?: any) => void;
function slug(opt?: Opt): (target: any, name: string, index?: any) => void;
function surrogatePair(opt?: Opt): (target: any, name: string, index?: any) => void;

@@ -76,0 +77,0 @@ function url(opt?: Opt & validatorJs.IsURLOptions): (target: any, name: string, index?: any) => void;

@@ -179,2 +179,6 @@ "use strict";

val.postalCode = postalCode;
function slug(opt) {
return check(x => validator_1.default.isSlug(x), opt && opt.message || "Invalid slug");
}
val.slug = slug;
function surrogatePair(opt) {

@@ -181,0 +185,0 @@ return check(x => validator_1.default.isSurrogatePair(x), opt && opt.message || "Invalid surrogate pair");

@@ -86,4 +86,6 @@ "use strict";

function visitor(value, ast, opt) {
if (value === undefined || value === null || value.constructor === ast.type || ast.type === Object)
if (value === undefined || value === null)
return { value };
if (value.constructor === ast.type || ast.type === Object)
return { value: ast.kind === "Array" && opt.guessArrayElement && !Array.isArray(value) ? [value] : value };
return visitorMap[ast.kind](value, ast, opt);

@@ -90,0 +92,0 @@ }

{
"name": "typedconverter",
"version": "2.1.0",
"version": "2.2.0",
"description": "Convert object into classes match with TypeScript type annotation",

@@ -22,5 +22,5 @@ "main": "lib/index.js",

"@types/validator": "^12.0.1",
"tinspector": "^2.2.9",
"tinspector": "^2.2.10",
"tslib": "^1.10.0",
"validator": "^12.1.0"
"validator": "^12.2.0"
},

@@ -36,4 +36,4 @@ "devDependencies": {

"ts-jest": "^24.3.0",
"ts-node": "^8.6.1",
"typescript": "^3.7.4"
"ts-node": "^8.6.2",
"typescript": "^3.7.5"
},

@@ -40,0 +40,0 @@ "bugs": {

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