Comparing version 1.9.2 to 1.9.3
// Generated by CoffeeScript 1.3.3 | ||
(function() { | ||
var balUtilFlow, | ||
__slice = [].slice, | ||
__hasProp = {}.hasOwnProperty, | ||
__slice = [].slice, | ||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | ||
balUtilFlow = { | ||
extractOptsAndCallback: function(opts, next) { | ||
if (typeof opts === 'function' && (next != null) === false) { | ||
next = opts; | ||
opts = {}; | ||
} else { | ||
opts || (opts = {}); | ||
} | ||
next || (next = opts.next || null); | ||
return [opts, next]; | ||
}, | ||
fireWithOptionalCallback: function(method, args, context) { | ||
@@ -41,2 +51,17 @@ var callback, err, result; | ||
}, | ||
extend: function() { | ||
var key, obj, objs, target, value, _i, _len; | ||
target = arguments[0], objs = 2 <= arguments.length ? __slice.call(arguments, 1) : []; | ||
target || (target = {}); | ||
for (_i = 0, _len = objs.length; _i < _len; _i++) { | ||
obj = objs[_i]; | ||
obj || (obj = {}); | ||
for (key in obj) { | ||
if (!__hasProp.call(obj, key)) continue; | ||
value = obj[key]; | ||
target[key] = value; | ||
} | ||
} | ||
return target; | ||
}, | ||
each: function(obj, callback, context) { | ||
@@ -43,0 +68,0 @@ var broke, item, key, _i, _len; |
{ | ||
"name": "bal-util", | ||
"version": "1.9.2", | ||
"version": "1.9.3", | ||
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util", |
58443
1733