Sha256: 6aad6c37a6504c8be6a6e4a548068de72360b46fcd481006c51d9def5c94c91b

Contents?: true

Size: 1.33 KB

Versions: 18

Compression:

Stored size: 1.33 KB

Contents

(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);

Version data entries

18 entries across 18 versions & 8 rubygems

Version Path
ilog-0.4.1 node_modules/autoprefixer/lib/utils.js
ilog-0.4.0 node_modules/autoprefixer/lib/utils.js
ilog-0.3.3 node_modules/autoprefixer/lib/utils.js
optimacms-0.4.3 spec/dummy/node_modules/autoprefixer/lib/utils.js
optimacms-0.4.2 spec/dummy/node_modules/autoprefixer/lib/utils.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/autoprefixer/lib/utils.js
lux_assets-0.2.11 ./node_modules/autoprefixer/lib/utils.js
lux_assets-0.2.9 ./node_modules/autoprefixer/lib/utils.js
lux_assets-0.2.4 ./node_modules/autoprefixer/lib/utils.js
lux_assets-0.2.2 ./node_modules/autoprefixer/lib/utils.js
lux_assets-0.2.1 ./node_modules/autoprefixer/lib/utils.js
locomotivecms-3.4.0 app/javascript/node_modules/autoprefixer/lib/utils.js
cortex-0.1.3 spec/dummy/node_modules/cssnano/node_modules/autoprefixer/lib/utils.js
lanes-0.8.0 node_modules/autoprefixer/lib/utils.js
blackboard-3.1.9 lib/site_template/node_modules/autoprefixer/lib/utils.js
gulp_assets-1.0.0.pre.5 template/node_modules/autoprefixer/lib/utils.js
gulp_assets-1.0.0.pre.4 template/node_modules/autoprefixer/lib/utils.js
gulp_assets-1.0.0.pre.3 template/node_modules/autoprefixer/lib/utils.js