mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
# add dist
This commit is contained in:
23
ng2-components/ng2-alfresco-documentslist/dist/node_modules/component-bind/index.js
generated
vendored
Normal file
23
ng2-components/ng2-alfresco-documentslist/dist/node_modules/component-bind/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Slice reference.
|
||||
*/
|
||||
|
||||
var slice = [].slice;
|
||||
|
||||
/**
|
||||
* Bind `obj` to `fn`.
|
||||
*
|
||||
* @param {Object} obj
|
||||
* @param {Function|String} fn or string
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports = function(obj, fn){
|
||||
if ('string' == typeof fn) fn = obj[fn];
|
||||
if ('function' != typeof fn) throw new Error('bind() requires a function');
|
||||
var args = slice.call(arguments, 2);
|
||||
return function(){
|
||||
return fn.apply(obj, args.concat(slice.call(arguments)));
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user