Comparing version 0.0.6 to 0.0.7
{ | ||
"name": "bops", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "buffer operations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
var proto = {} | ||
, rex = /read.+/ | ||
, fn | ||
, buildFn | ||
fn = function() { | ||
buildFn = function(key) { | ||
var code = '' + | ||
'return buf.' + key + '(' + ['a', 'b', 'c'].join(',' ) + ')' | ||
return new Function(['buf', 'a', 'b', 'c'], code) | ||
} | ||
@@ -13,4 +16,4 @@ | ||
if(rex.test(key)) { | ||
proto[key] = fn.call.bind(Buffer.prototype[key]) | ||
proto[key] = buildFn(key) | ||
} | ||
} |
@@ -23,3 +23,3 @@ module.exports = copy | ||
if(target.length - target_start < source_end - source_start) { | ||
source_end = target.length - target_start + start | ||
source_end = target.length - target_start + source_start | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -5,6 +5,9 @@ var Buffer = require('buffer').Buffer | ||
, rex = /write.+/ | ||
, fn | ||
, buildFn | ||
fn = function() { | ||
buildFn = function(key) { | ||
var code = '' + | ||
'return buf.' + key + '(' + ['a', 'b', 'c'].join(',' ) + ')' | ||
return new Function(['buf', 'a', 'b', 'c'], code) | ||
} | ||
@@ -16,4 +19,4 @@ | ||
if(rex.test(key)) { | ||
proto[key] = fn.call.bind(Buffer.prototype[key]) | ||
proto[key] = buildFn(key) | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37248
33
1084
2
1