Преглед изворни кода

Locally cache some references

tags/0.7.3
Michael Jackson пре 13 година
родитељ
комит
2ab776c3a5
1 измењених фајлова са 5 додато и 2 уклоњено
  1. +5
    -2
      mustache.js

+ 5
- 2
mustache.js Прегледај датотеку

@@ -32,10 +32,13 @@
var curlyRe = /\s*\}/;
var tagRe = /#|\^|\/|>|\{|&|=|!/;

var _test = RegExp.prototype.test;
var _toString = Object.prototype.toString;

// Workaround for https://issues.apache.org/jira/browse/COUCHDB-577
// See https://github.com/janl/mustache.js/issues/189
function testRe(re, string) {
return RegExp.prototype.test.call(re, string);
return _test.call(re, string);
}

function isWhitespace(string) {
@@ -43,7 +46,7 @@
}

var isArray = Array.isArray || function (obj) {
return Object.prototype.toString.call(obj) === "[object Array]";
return _toString.call(obj) === '[object Array]';
};

function escapeRe(string) {


Loading…
Откажи
Сачувај