UNPKG

react-ionicons

Version:

A React SVG ionicon component

56 lines (51 loc) 1.35 kB
'use strict'; exports.__esModule = true; /** * Contains helpers for working with vendor prefixes. * * @example * const vendor = postcss.vendor; * * @namespace vendor */ var vendor = { /** * Returns the vendor prefix extracted from an input string. * * @param {string} prop - string with or without vendor prefix * * @return {string} vendor prefix or empty string * * @example * postcss.vendor.prefix('-moz-tab-size') //=> '-moz-' * postcss.vendor.prefix('tab-size') //=> '' */ prefix: function prefix(prop) { if (prop[0] === '-') { var sep = prop.indexOf('-', 1); return prop.substr(0, sep + 1); } else { return ''; } }, /** * Returns the input string stripped of its vendor prefix. * * @param {string} prop - string with or without vendor prefix * * @return {string} string name without vendor prefixes * * @example * postcss.vendor.unprefixed('-moz-tab-size') //=> 'tab-size' */ unprefixed: function unprefixed(prop) { if (prop[0] === '-') { var sep = prop.indexOf('-', 1); return prop.substr(sep + 1); } else { return prop; } } }; exports.default = vendor; module.exports = exports['default'];