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

@colyseus/schema

Package Overview
Dependencies
Maintainers
1
Versions
337
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colyseus/schema - npm Package Compare versions

Comparing version 0.4.11 to 0.4.12

2

lib/annotations.js

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

case "string":
encode.assertType(value, "string");
encode.assertType(value, "string", true);
break;

@@ -50,0 +50,0 @@ }

@@ -24,3 +24,3 @@ /**

export declare function utf8Write(view: any, offset: any, str: any): void;
export declare function assertType(value: any, type: any): void;
export declare function assertType(value: any, type: string, allowNull?: boolean): void;
export declare function int8(bytes: any, value: any): void;

@@ -27,0 +27,0 @@ export declare function uint8(bytes: any, value: any): void;

@@ -45,9 +45,3 @@ "use strict";

function EncodeSchemaError() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, args) || this;
Error.captureStackTrace(_this, EncodeSchemaError);
return _this;
return _super !== null && _super.apply(this, arguments) || this;
}

@@ -103,4 +97,5 @@ return EncodeSchemaError;

exports.utf8Write = utf8Write;
function assertType(value, type) {
if (typeof (value) !== type) {
function assertType(value, type, allowNull) {
if (allowNull === void 0) { allowNull = false; }
if (typeof (value) !== type && (!allowNull || (allowNull && value !== null))) {
throw new EncodeSchemaError("a '" + type + "' was expected, but a '" + JSON.stringify(value) + "' was provided.");

@@ -107,0 +102,0 @@ }

{
"name": "@colyseus/schema",
"version": "0.4.11",
"version": "0.4.12",
"description": "Schema-based binary serializer / de-serializer.",

@@ -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