summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js b/bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js
new file mode 100644
index 00000000..c8b4f7b9
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/cssfilter/lib/util.js
@@ -0,0 +1,35 @@
+module.exports = {
+ indexOf: function (arr, item) {
+ var i, j;
+ if (Array.prototype.indexOf) {
+ return arr.indexOf(item);
+ }
+ for (i = 0, j = arr.length; i < j; i++) {
+ if (arr[i] === item) {
+ return i;
+ }
+ }
+ return -1;
+ },
+ forEach: function (arr, fn, scope) {
+ var i, j;
+ if (Array.prototype.forEach) {
+ return arr.forEach(fn, scope);
+ }
+ for (i = 0, j = arr.length; i < j; i++) {
+ fn.call(scope, arr[i], i, arr);
+ }
+ },
+ trim: function (str) {
+ if (String.prototype.trim) {
+ return str.trim();
+ }
+ return str.replace(/(^\s*)|(\s*$)/g, '');
+ },
+ trimRight: function (str) {
+ if (String.prototype.trimRight) {
+ return str.trimRight();
+ }
+ return str.replace(/(\s*$)/g, '');
+ }
+};