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

jpacks

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpacks - npm Package Compare versions

Comparing version 0.6.10 to 0.6.12

4

jpacks.dev.js

@@ -8,4 +8,4 @@ (function (exportName) {

* zswang (http://weibo.com/zswang)
* @version 0.6.10
* @date 2016-03-16
* @version 0.6.12
* @date 2016-03-18
*/

@@ -12,0 +12,0 @@ function createSchema() {

@@ -8,4 +8,4 @@ (function (exportName) {

* zswang (http://weibo.com/zswang)
* @version 0.6.10
* @date 2016-03-16
* @version 0.6.12
* @date 2016-03-18
*/

@@ -12,0 +12,0 @@ function createSchema() {

@@ -5,3 +5,3 @@ {

"description": "Binary data packing and unpacking.",
"version": "0.6.10",
"version": "0.6.12",
"homepage": "http://github.com/zswang/jpacks",

@@ -8,0 +8,0 @@ "main": "jpacks.js",

@@ -70,2 +70,3 @@ var protobufjs = require('protobufjs');

}
function bytesprase(value, options) {

@@ -275,11 +276,22 @@ if (options.protobuf_bytesAsString) {

function protobufCreator(prototext, messagepath, size) {
var builder;
if (/\s.*[{};]/.test(prototext)) {
builder = protobufjs.loadProto(prototext);
} else {
builder = protobufjs.loadProtoFile(prototext);
var messager;
/**
* 采用动态加载的策略
*/
function initMessager() {
if (messager) {
return;
}
var builder;
if (/\s.*[{};]/.test(prototext)) {
builder = protobufjs.loadProto(prototext);
} else {
builder = protobufjs.loadProtoFile(prototext);
}
messager = builder.build(messagepath);
}
var messager = builder.build(messagepath);
return new Schema({
unpack: function(buffer, options, offsets) {
initMessager();
var bytes = Schema.unpack(Schema.bytes(size), buffer, options, offsets);

@@ -294,2 +306,3 @@ var rs = messager.decode(bytes);

pack: function _pack(value, options, buffer) {
initMessager();
if (!value) {

@@ -296,0 +309,0 @@ return;

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