mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
One character fix, for the sake of consistency.
This commit is contained in:
@@ -1962,7 +1962,7 @@
|
|||||||
UTILITIES = {
|
UTILITIES = {
|
||||||
"extends": 'function(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n if (typeof parent.extended === "function") parent.extended(child);\n child.__super__ = parent.prototype;\n}',
|
"extends": 'function(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n if (typeof parent.extended === "function") parent.extended(child);\n child.__super__ = parent.prototype;\n}',
|
||||||
bind: 'function(func, context) {\n return function() { return func.apply(context, arguments); };\n}',
|
bind: 'function(func, context) {\n return function() { return func.apply(context, arguments); };\n}',
|
||||||
inArray: '(function() {\n var indexOf = Array.prototype.indexOf || function (item) {\n var i = this.length; while (i--) if (this[i] === item) return i;\n return -1;\n };\n return function(array, item) { return indexOf.call(array, item) > -1; };\n})();',
|
inArray: '(function() {\n var indexOf = Array.prototype.indexOf || function(item) {\n var i = this.length; while (i--) if (this[i] === item) return i;\n return -1;\n };\n return function(array, item) { return indexOf.call(array, item) > -1; };\n})();',
|
||||||
hasProp: 'Object.prototype.hasOwnProperty',
|
hasProp: 'Object.prototype.hasOwnProperty',
|
||||||
slice: 'Array.prototype.slice'
|
slice: 'Array.prototype.slice'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1674,7 +1674,7 @@ UTILITIES =
|
|||||||
# Discover if an item is in an array.
|
# Discover if an item is in an array.
|
||||||
inArray: '''
|
inArray: '''
|
||||||
(function() {
|
(function() {
|
||||||
var indexOf = Array.prototype.indexOf || function (item) {
|
var indexOf = Array.prototype.indexOf || function(item) {
|
||||||
var i = this.length; while (i--) if (this[i] === item) return i;
|
var i = this.length; while (i--) if (this[i] === item) return i;
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user