BVB Source Codes

reactide Show utils.js Source code

Return Download reactide: download utils.js Source code - Download reactide Source code - Type:.js
  1. (function() {
  2.   var list;
  3.  
  4.   list = require('postcss/lib/list');
  5.  
  6.   module.exports = {
  7.     error: function(text) {
  8.       var err;
  9.       err = new Error(text);
  10.       err.autoprefixer = true;
  11.       throw err;
  12.     },
  13.     uniq: function(array) {
  14.       var filtered, i, j, len;
  15.       filtered = [];
  16.       for (j = 0, len = array.length; j < len; j++) {
  17.         i = array[j];
  18.         if (filtered.indexOf(i) === -1) {
  19.           filtered.push(i);
  20.         }
  21.       }
  22.       return filtered;
  23.     },
  24.     removeNote: function(string) {
  25.       if (string.indexOf(' ') === -1) {
  26.         return string;
  27.       } else {
  28.         return string.split(' ')[0];
  29.       }
  30.     },
  31.     escapeRegexp: function(string) {
  32.       return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
  33.     },
  34.     regexp: function(word, escape) {
  35.       if (escape == null) {
  36.         escape = true;
  37.       }
  38.       if (escape) {
  39.         word = this.escapeRegexp(word);
  40.       }
  41.       return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
  42.     },
  43.     editList: function(value, callback) {
  44.       var changed, join, origin;
  45.       origin = list.comma(value);
  46.       changed = callback(origin, []);
  47.       if (origin === changed) {
  48.         return value;
  49.       } else {
  50.         join = value.match(/,\s*/);
  51.         join = join ? join[0] : ', ';
  52.         return changed.join(join);
  53.       }
  54.     }
  55.   };
  56.  
  57. }).call(this);
  58.  
downloadutils.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top