Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

style-to-js

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-to-js - npm Package Compare versions

Comparing version 1.1.6 to 1.1.7

6

package.json
{
"name": "style-to-js",
"version": "1.1.6",
"version": "1.1.7",
"description": "Parses CSS inline style to JavaScript object (camelCased).",

@@ -39,3 +39,3 @@ "author": "Mark <mark@remarkablemark.org>",

"dependencies": {
"style-to-object": "1.0.1"
"style-to-object": "1.0.3"
},

@@ -48,3 +48,3 @@ "devDependencies": {

"@rollup/plugin-typescript": "11.1.5",
"@types/jest": "29.5.5",
"@types/jest": "29.5.6",
"@typescript-eslint/eslint-plugin": "6.8.0",

@@ -51,0 +51,0 @@ "@typescript-eslint/parser": "6.8.0",

@@ -312,3 +312,4 @@ (function (global, factory) {

var StyleToObject = _default.default;
// ensure compatibility with rollup umd build
var StyleToObject = _default.default || _default;

@@ -315,0 +316,0 @@ var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).StyleToJS=n()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,f=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function s(e){return e?e.replace(c,l):l}var p=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var d=p((function(e,n){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var c=1,p=1;function d(e){var n=e.match(r);n&&(c+=n.length);var t=e.lastIndexOf("\n");p=~t?e.length-t:p+e.length}function v(){var e={line:c,column:p};return function(n){return n.position=new h(e),g(),n}}function h(e){this.start=e,this.end={line:c,column:p},this.source=n.source}function m(t){var r=new Error(n.source+":"+c+":"+p+": "+t);if(r.reason=t,r.filename=n.source,r.line=c,r.column=p,r.source=e,!n.silent)throw r}function y(n){var t=n.exec(e);if(t){var r=t[0];return d(r),e=e.slice(r.length),t}}function g(){y(o)}function w(e){var n;for(e=e||[];n=b();)!1!==n&&e.push(n);return e}function b(){var n=v();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var t=2;l!=e.charAt(t)&&("*"!=e.charAt(t)||"/"!=e.charAt(t+1));)++t;if(t+=2,l===e.charAt(t-1))return m("End of comment missing");var r=e.slice(2,t-2);return p+=2,d(r),e=e.slice(t),p+=2,n({type:"comment",comment:r})}}function A(){var e=v(),n=y(i);if(n){if(b(),!y(u))return m("property missing ':'");var r=y(f),o=e({type:"declaration",property:s(n[0].replace(t,l)),value:r?s(r[0].replace(t,l)):l});return y(a),o}}return h.prototype.content=e,g(),function(){var e,n=[];for(w(n);e=A();)!1!==e&&(n.push(e),w(n));return n}()}));var v=(n.default=function(e,n){var t=null;if(!e||"string"!=typeof e)return t;var r=(0,d.default)(e),o="function"==typeof n;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?n(r,i,e):i&&((t=t||{})[r]=i)}})),t}).default,h=/^--[a-zA-Z0-9-]+$/,m=/-([a-z])/g,y=/^[^-]+$/,g=/^-(webkit|moz|ms|o|khtml)-/,w=/^-(ms)-/,b=function(e,n){return n.toUpperCase()},A=function(e,n){return"".concat(n,"-")},_=function(e,n){return void 0===n&&(n={}),function(e){return!e||y.test(e)||h.test(e)}(e)?e:(e=e.toLowerCase(),(e=n.reactCompat?e.replace(w,A):e.replace(g,A)).replace(m,b))};return function(e,n){var t={};return e&&"string"==typeof e?(v(e,(function(e,r){e&&r&&(t[_(e,n)]=r)})),t):t}}));
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).StyleToJS=n()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,o=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,f=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,l="";function s(e){return e?e.replace(c,l):l}var p=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var d=p((function(e,n){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var c=1,p=1;function d(e){var n=e.match(r);n&&(c+=n.length);var t=e.lastIndexOf("\n");p=~t?e.length-t:p+e.length}function v(){var e={line:c,column:p};return function(n){return n.position=new h(e),g(),n}}function h(e){this.start=e,this.end={line:c,column:p},this.source=n.source}function m(t){var r=new Error(n.source+":"+c+":"+p+": "+t);if(r.reason=t,r.filename=n.source,r.line=c,r.column=p,r.source=e,!n.silent)throw r}function y(n){var t=n.exec(e);if(t){var r=t[0];return d(r),e=e.slice(r.length),t}}function g(){y(o)}function w(e){var n;for(e=e||[];n=b();)!1!==n&&e.push(n);return e}function b(){var n=v();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var t=2;l!=e.charAt(t)&&("*"!=e.charAt(t)||"/"!=e.charAt(t+1));)++t;if(t+=2,l===e.charAt(t-1))return m("End of comment missing");var r=e.slice(2,t-2);return p+=2,d(r),e=e.slice(t),p+=2,n({type:"comment",comment:r})}}function A(){var e=v(),n=y(i);if(n){if(b(),!y(u))return m("property missing ':'");var r=y(f),o=e({type:"declaration",property:s(n[0].replace(t,l)),value:r?s(r[0].replace(t,l)):l});return y(a),o}}return h.prototype.content=e,g(),function(){var e,n=[];for(w(n);e=A();)!1!==e&&(n.push(e),w(n));return n}()}));var v=n.default=function(e,n){var t=null;if(!e||"string"!=typeof e)return t;var r=(0,d.default)(e),o="function"==typeof n;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?n(r,i,e):i&&((t=t||{})[r]=i)}})),t},h=v.default||v,m=/^--[a-zA-Z0-9-]+$/,y=/-([a-z])/g,g=/^[^-]+$/,w=/^-(webkit|moz|ms|o|khtml)-/,b=/^-(ms)-/,A=function(e,n){return n.toUpperCase()},_=function(e,n){return"".concat(n,"-")},T=function(e,n){return void 0===n&&(n={}),function(e){return!e||g.test(e)||m.test(e)}(e)?e:(e=e.toLowerCase(),(e=n.reactCompat?e.replace(b,_):e.replace(w,_)).replace(y,A))};return function(e,n){var t={};return e&&"string"==typeof e?(h(e,(function(e,r){e&&r&&(t[T(e,n)]=r)})),t):t}}));
//# sourceMappingURL=style-to-js.min.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc