%PDF- %PDF-
Direktori : /var/www/html/node_modules/style-to-js/cjs/ |
Current File : /var/www/html/node_modules/style-to-js/cjs/utilities.js |
"use strict"; exports.__esModule = true; exports.camelCase = void 0; var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/; var HYPHEN_REGEX = /-([a-z])/g; var NO_HYPHEN_REGEX = /^[^-]+$/; var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/; var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/; var skipCamelCase = function (property) { return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property); }; var capitalize = function (match, character) { return character.toUpperCase(); }; var trimHyphen = function (match, prefix) { return "".concat(prefix, "-"); }; var camelCase = function (property, options) { if (options === void 0) { options = {}; } if (skipCamelCase(property)) { return property; } property = property.toLowerCase(); if (options.reactCompat) { property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen); } else { property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen); } return property.replace(HYPHEN_REGEX, capitalize); }; exports.camelCase = camelCase;