Socket
Socket
Sign inDemoInstall

node-opcua-buffer-utils

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-buffer-utils - npm Package Compare versions

Comparing version 0.5.0 to 2.0.0-alpha.2

3

dist/buffer_utils.d.ts
/// <reference types="node" />
/***
* @module node-opcua-buffer-utils
*/
export declare const createFastUninitializedBuffer: Function;

@@ -3,0 +6,0 @@ /**

7

dist/buffer_utils.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/***
* @module node-opcua-buffer-utils
*/
//

@@ -11,3 +14,3 @@ // note: new Buffer(size)# is deprecated since: v6.0. and is replaced with Buffer.allocUnsafe

//
exports.createFastUninitializedBuffer = Buffer.allocUnsafe ? Buffer.allocUnsafe : function a(size) {
exports.createFastUninitializedBuffer = Buffer.allocUnsafe ? Buffer.allocUnsafe : (size) => {
return new Buffer(size);

@@ -29,3 +32,3 @@ };

let i = 0;
l.forEach(function (value) {
l.forEach((value) => {
b.writeUInt8(parseInt(value, 16), i);

@@ -32,0 +35,0 @@ i += 1;

{
"name": "node-opcua-buffer-utils",
"version": "0.5.0",
"version": "2.0.0-alpha.2",
"description": "pure nodejs OPCUA SDK - module -buffer-utils",
"main": "dist/buffer_utils.js",
"types": "dist/buffer_utils.d.ts",
"main": "./dist/buffer_utils.js",
"types": "./dist/buffer_utils.d.ts",
"scripts": {
"build": "tsc",
"test": "mocha test"
"test": "mocha test",
"clean": "node -e \"require('rimraf').sync('dist');\"",
"lint": "tslint source/**/*.ts"
},

@@ -14,6 +16,6 @@ "author": "Etienne Rossignon",

"dependencies": {
"node-opcua-assert": "^0.5.0"
"node-opcua-assert": "^2.0.0-alpha.2"
},
"devDependencies": {
"node-opcua-benchmarker": "^0.5.0"
"node-opcua-benchmarker": "^2.0.0-alpha.2"
},

@@ -33,3 +35,3 @@ "repository": {

"homepage": "http://node-opcua.github.io/",
"gitHead": "7c2f2dcb6ebdc49e57da1a028406a307df502d4e"
"gitHead": "7f57dd90e9d8bd1abcb8d330b3470999ac51e33f"
}

@@ -0,1 +1,4 @@

/***
* @module node-opcua-buffer-utils
*/
//

@@ -9,5 +12,6 @@ // note: new Buffer(size)# is deprecated since: v6.0. and is replaced with Buffer.allocUnsafe

//
export const createFastUninitializedBuffer : Function = Buffer.allocUnsafe ? Buffer.allocUnsafe : function a (size: number) {
return new Buffer(size);
};
export const createFastUninitializedBuffer: Function =
Buffer.allocUnsafe ? Buffer.allocUnsafe : (size: number) => {
return new Buffer(size);
};

@@ -24,7 +28,7 @@ /**

*/
export function makeBuffer(listOfBytes : string): Buffer {
export function makeBuffer(listOfBytes: string): Buffer {
const l = listOfBytes.split(" ");
const b = exports.createFastUninitializedBuffer(l.length);
let i = 0;
l.forEach(function (value) {
l.forEach((value) => {
b.writeUInt8(parseInt(value, 16), i);

@@ -31,0 +35,0 @@ i += 1;

{
"extends" : "../tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"target": "es6",
"module": "commonjs",
"declaration": true,
"outDir": "./dist",
"sourceMap": true,
"sourceRoot": "./source",
"strict": true
"rootDir": "source",
"outDir": "dist"
}
}

Sorry, the diff of this file is not supported yet

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