From baac68ae2a2e6eddf118d6683a6c4ce56d86b939 Mon Sep 17 00:00:00 2001 From: Caleb Wright Date: Tue, 10 Feb 2015 14:20:33 -0500 Subject: [PATCH] Rename define to definition - Rename `define` to `definition` in `component.js` `component.js`'s internal `define` function can be mixed up with requirejs's use of `define` as seen in [amd-optimize](https://github.com/scalableminds/amd-optimize/pull/42) --- lib/component.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/component.js b/lib/component.js index c3cf02fc..12314309 100644 --- a/lib/component.js +++ b/lib/component.js @@ -76,8 +76,8 @@ define( // define the constructor for a custom component type // takes an unlimited number of mixin functions as arguments - // typical api call with 3 mixins: define(timeline, withTweetCapability, withScrollCapability); - function define(/*mixins*/) { + // typical api call with 3 mixins: definition(timeline, withTweetCapability, withScrollCapability); + function definition(/*mixins*/) { // unpacking arguments by hand benchmarked faster var l = arguments.length; var mixins = new Array(l); @@ -96,7 +96,7 @@ define( // enables extension of existing "base" Components Component.mixin = function() { - var newComponent = define(); //TODO: fix pretty print + var newComponent = definition(); //TODO: fix pretty print var newPrototype = Object.create(Component.prototype); newPrototype.mixedIn = [].concat(Component.prototype.mixedIn); newPrototype.attrDef = Component.prototype.attrDef; @@ -117,13 +117,13 @@ define( return Component; } - define.teardownAll = function() { + definition.teardownAll = function() { registry.components.slice().forEach(function(c) { c.component.teardownAll(); }); registry.reset(); }; - return define; + return definition; } );