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

raptor-util

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raptor-util - npm Package Compare versions

Comparing version 0.2.4-beta to 0.2.5-beta

19

createError.js
module.exports = function(message, cause) {
var error,
argsLen = arguments.length,
E = Error;
var error;
var argsLen = arguments.length;
var E = Error;

@@ -10,14 +10,9 @@ if (argsLen == 2) {

error.stack += '\nCaused by: ' + (cause.stack || cause);
}
else {
} else {
error._cause = cause;
}
}
else if (argsLen == 1) {
if (message instanceof E)
{
} else if (argsLen == 1) {
if (message instanceof E) {
error = message;
}
else
{
} else {
error = new E(message);

@@ -24,0 +19,0 @@ }

@@ -0,1 +1,18 @@

/**
* Utility method to iterate over elements in an Array that
* internally uses the "forEach" property of the array.
*
* <p>
* If the input Array is null/undefined then nothing is done.
*
* <p>
* If the input object does not have a "forEach" method then
* it is converted to a single element Array and iterated over.
*
*
* @param {Array|Object} a An Array or an Object
* @param {Function} fun The callback function for each property
* @param {Object} thisp The "this" object to use for the callback function
* @return {void}
*/
module.exports = function(a, func, thisp) {

@@ -2,0 +19,0 @@ if (a != null) {

@@ -0,1 +1,27 @@

/**
* Invokes a provided callback for each name/value pair
* in a JavaScript object.
*
* <p>
* <h2>Usage</h2>
* <js>
* raptor.forEachEntry(
* {
* firstName: "John",
* lastName: "Doe"
* },
* function(name, value) {
* console.log(name + '=' + value);
* },
* this);
* )
* // Output:
* // firstName=John
* // lastName=Doe
* </js>
* @param {Object} o A JavaScript object that contains properties to iterate over
* @param {Function} fun The callback function for each property
* @param {Object} thisp The "this" object to use for the callback function
* @return {void}
*/
module.exports = function(o, fun, thisp) {

@@ -2,0 +28,0 @@ for (var k in o)

@@ -25,3 +25,3 @@ {

},
"version": "0.2.4-beta"
"version": "0.2.5-beta"
}
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