flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
57
VISUALIZACION/node_modules/autoprefixer/lib/utils.js
generated
vendored
Executable file
57
VISUALIZACION/node_modules/autoprefixer/lib/utils.js
generated
vendored
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
(function() {
|
||||
var list;
|
||||
|
||||
list = require('postcss/lib/list');
|
||||
|
||||
module.exports = {
|
||||
error: function(text) {
|
||||
var err;
|
||||
err = new Error(text);
|
||||
err.autoprefixer = true;
|
||||
throw err;
|
||||
},
|
||||
uniq: function(array) {
|
||||
var filtered, i, j, len;
|
||||
filtered = [];
|
||||
for (j = 0, len = array.length; j < len; j++) {
|
||||
i = array[j];
|
||||
if (filtered.indexOf(i) === -1) {
|
||||
filtered.push(i);
|
||||
}
|
||||
}
|
||||
return filtered;
|
||||
},
|
||||
removeNote: function(string) {
|
||||
if (string.indexOf(' ') === -1) {
|
||||
return string;
|
||||
} else {
|
||||
return string.split(' ')[0];
|
||||
}
|
||||
},
|
||||
escapeRegexp: function(string) {
|
||||
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
|
||||
},
|
||||
regexp: function(word, escape) {
|
||||
if (escape == null) {
|
||||
escape = true;
|
||||
}
|
||||
if (escape) {
|
||||
word = this.escapeRegexp(word);
|
||||
}
|
||||
return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
|
||||
},
|
||||
editList: function(value, callback) {
|
||||
var changed, join, origin;
|
||||
origin = list.comma(value);
|
||||
changed = callback(origin, []);
|
||||
if (origin === changed) {
|
||||
return value;
|
||||
} else {
|
||||
join = value.match(/,\s*/);
|
||||
join = join ? join[0] : ', ';
|
||||
return changed.join(join);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
Loading…
Add table
Add a link
Reference in a new issue