New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

archetype-js

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archetype-js - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

index.js
exports.Any = require('./src').Any;
exports.Schema = require('./src').Schema;
exports.to = require('./src/unmarshal/util').handleCast;
exports.to = require('./src/unmarshal/util').to;
{
"name": "archetype-js",
"version": "0.1.4",
"version": "0.1.5",
"author": "Valeri Karpov <val@boosterfuels.com>",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -15,11 +15,15 @@ 'use strict';

exports.handleCast = function(obj, key, type) {
exports.to = function(v, type) {
if (SPECIAL_CASES.has(type)) {
obj[key] = SPECIAL_CASES.get(type)(obj[key]);
return;
return SPECIAL_CASES.get(type)(v);
}
if (!(obj[key] instanceof type)) {
obj[key] = new type(obj[key]);
if (!(v instanceof type)) {
return new type(v);
}
return v;
}
exports.handleCast = function(obj, key, type) {
obj[key] = exports.to(obj[key], type);
};

@@ -26,0 +30,0 @@

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