BVB Source Codes

reactide Show filter-value.js Source code

Return Download reactide: download filter-value.js Source code - Download reactide Source code - Type:.js
  1. (function() {
  2.   var FilterValue, OldFilterValue, OldValue, Value, utils,
  3.     extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4.     hasProp = {}.hasOwnProperty;
  5.  
  6.   OldValue = require('../old-value');
  7.  
  8.   Value = require('../value');
  9.  
  10.   utils = require('../utils');
  11.  
  12.   OldFilterValue = (function(superClass) {
  13.     extend(OldFilterValue, superClass);
  14.  
  15.     function OldFilterValue() {
  16.       return OldFilterValue.__super__.constructor.apply(this, arguments);
  17.     }
  18.  
  19.     OldFilterValue.prototype.clean = function(decl) {
  20.       return decl.value = utils.editList(decl.value, (function(_this) {
  21.         return function(props) {
  22.           if (props.every(function(i) {
  23.             return i.indexOf(_this.unprefixed) !== 0;
  24.           })) {
  25.             return props;
  26.           }
  27.           return props.filter(function(i) {
  28.             return i.indexOf(_this.prefixed) === -1;
  29.           });
  30.         };
  31.       })(this));
  32.     };
  33.  
  34.     return OldFilterValue;
  35.  
  36.   })(OldValue);
  37.  
  38.   FilterValue = (function(superClass) {
  39.     extend(FilterValue, superClass);
  40.  
  41.     FilterValue.names = ['filter', 'filter-function'];
  42.  
  43.     function FilterValue(name, prefixes) {
  44.       FilterValue.__super__.constructor.apply(this, arguments);
  45.       if (name === 'filter-function') {
  46.         this.name = 'filter';
  47.       }
  48.     }
  49.  
  50.     FilterValue.prototype.replace = function(value, prefix) {
  51.       if (prefix === '-webkit-' && value.indexOf('filter(') === -1) {
  52.         if (value.indexOf('-webkit-filter') === -1) {
  53.           return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
  54.         } else {
  55.           return value;
  56.         }
  57.       } else {
  58.         return FilterValue.__super__.replace.apply(this, arguments);
  59.       }
  60.     };
  61.  
  62.     FilterValue.prototype.old = function(prefix) {
  63.       return new OldFilterValue(this.name, prefix + this.name);
  64.     };
  65.  
  66.     return FilterValue;
  67.  
  68.   })(Value);
  69.  
  70.   module.exports = FilterValue;
  71.  
  72. }).call(this);
  73.  
downloadfilter-value.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