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

avsc

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avsc - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

26

lib/schemas.js

@@ -105,3 +105,3 @@ /* jshint node: true */

} catch (err) {
if (opts.assertLogicalType) {
if (opts.assertLogicalTypes) {
// The spec mandates that we fall through to the underlying type if

@@ -1796,19 +1796,27 @@ // the logical type is invalid. We provide this option to ease

LogicalType.prototype._write = function (tap, val) {
this._underlyingType._write(tap, this._toValue(val));
LogicalType.prototype._write = function (tap, any) {
this._underlyingType._write(tap, this._toValue(any));
};
LogicalType.prototype._check = function (val, cb) {
return this._underlyingType._check(this._toValue(val), cb);
LogicalType.prototype._check = function (any, cb) {
try {
var val = this._toValue(any);
} catch (err) {
if (cb) {
cb(PATH.slice(), any, this);
}
return false;
}
return this._underlyingType._check(val, cb);
};
LogicalType.prototype._copy = function (val, opts) {
LogicalType.prototype._copy = function (any, opts) {
var type = this._underlyingType;
switch (opts && opts.coerce) {
case 3: // To string.
return type._copy(this._toValue(val), opts);
return type._copy(this._toValue(any), opts);
case 2: // From string.
return this._fromValue(type._copy(val, opts));
return this._fromValue(type._copy(any, opts));
default: // Normal copy.
return this._fromValue(type._copy(this._toValue(val), opts));
return this._fromValue(type._copy(this._toValue(any), opts));
}

@@ -1815,0 +1823,0 @@ };

{
"name": "avsc",
"version": "3.1.0",
"version": "3.1.1",
"description": "Blazing fast serialization",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/mtth/avsc",

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