source: trip-planner-front/node_modules/autoprefixer/lib/hacks/image-set.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[6a3a178]1"use strict";
2
3function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
4
5function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
6
7function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
9var Value = require('../value');
10
11var ImageSet = /*#__PURE__*/function (_Value) {
12 _inheritsLoose(ImageSet, _Value);
13
14 function ImageSet() {
15 return _Value.apply(this, arguments) || this;
16 }
17
18 var _proto = ImageSet.prototype;
19
20 /**
21 * Use non-standard name for WebKit and Firefox
22 */
23 _proto.replace = function replace(string, prefix) {
24 var fixed = _Value.prototype.replace.call(this, string, prefix);
25
26 if (prefix === '-webkit-') {
27 fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2');
28 }
29
30 return fixed;
31 };
32
33 return ImageSet;
34}(Value);
35
36_defineProperty(ImageSet, "names", ['image-set']);
37
38module.exports = ImageSet;
Note: See TracBrowser for help on using the repository browser.