BVB Source Codes

reactide Show cross-fade.js Source code

Return Download reactide: download cross-fade.js Source code - Download reactide Source code - Type:.js
  1. (function() {
  2.   var CrossFade, OldValue, Value, list, 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.   list = require('postcss/lib/list');
  13.  
  14.   CrossFade = (function(superClass) {
  15.     extend(CrossFade, superClass);
  16.  
  17.     function CrossFade() {
  18.       return CrossFade.__super__.constructor.apply(this, arguments);
  19.     }
  20.  
  21.     CrossFade.names = ['cross-fade'];
  22.  
  23.     CrossFade.prototype.replace = function(string, prefix) {
  24.       return list.space(string).map((function(_this) {
  25.         return function(value) {
  26.           var after, args, close, match;
  27.           if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
  28.             return value;
  29.           }
  30.           close = value.lastIndexOf(')');
  31.           after = value.slice(close + 1);
  32.           args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
  33.           if (prefix === '-webkit-') {
  34.             match = args.match(/\d*.?\d+%?/);
  35.             if (match) {
  36.               args = args.slice(match[0].length).trim();
  37.               args += ', ' + match[0];
  38.             } else {
  39.               args += ', 0.5';
  40.             }
  41.           }
  42.           return prefix + _this.name + '(' + args + ')' + after;
  43.         };
  44.       })(this)).join(' ');
  45.     };
  46.  
  47.     return CrossFade;
  48.  
  49.   })(Value);
  50.  
  51.   module.exports = CrossFade;
  52.  
  53. }).call(this);
  54.  
downloadcross-fade.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