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 1.0.1 to 1.0.2

6

lib/converter.js

@@ -29,4 +29,8 @@ "use strict";

const value = safeToString(rawValue);
if (value === "")
return;
const result = Number(value);
return isNaN(result) ? undefined : result;
if (isNaN(result))
return;
return result;
}

@@ -33,0 +37,0 @@ function dateConverter(rawValue) {

2

lib/validation.js

@@ -36,3 +36,3 @@ "use strict";

function isEmpty(result) {
return (result.value === undefined || result.value === null) && result.issues === undefined;
return (result.value === "" || result.value === undefined || result.value === null) && result.issues === undefined;
}

@@ -39,0 +39,0 @@ // --------------------------------------------------------------------- //

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

@@ -24,7 +24,7 @@ "main": "lib/index.js",

"tslib": "^1.10.0",
"validator": "^11.1.0"
"validator": "^12.0.0"
},
"devDependencies": {
"@types/ejs": "^2.6.3",
"@types/jest": "^24.0.19",
"@types/jest": "^24.0.21",
"@types/joi": "^14.3.3",

@@ -31,0 +31,0 @@ "coveralls": "^3.0.7",

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