style-to-object
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -7,3 +7,7 @@ (function (global, factory) { | ||
var styleToObject = {exports: {}}; | ||
exports["default"] = {}; | ||
var styleToObject = { | ||
get exports(){ return exports["default"]; }, | ||
set exports(v){ exports["default"] = v; }, | ||
}; | ||
@@ -310,6 +314,6 @@ // http://www.w3.org/TR/CSS21/grammar.html | ||
styleToObject.exports = StyleToObject; | ||
styleToObject.exports.default = StyleToObject; // ESM support | ||
exports["default"].default = StyleToObject; // ESM support | ||
return styleToObject.exports; | ||
return exports["default"]; | ||
})); |
@@ -1,2 +0,2 @@ | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).StyleToObject=e()}(this,(function(){"use strict";var r={exports:{}},e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,s="";function a(r){return r?r.replace(f,s):s}var l=function(r,f){if("string"!=typeof r)throw new TypeError("First argument must be a string");if(!r)return[];f=f||{};var l=1,p=1;function h(r){var e=r.match(n);e&&(l+=e.length);var t=r.lastIndexOf("\n");p=~t?r.length-t:p+r.length}function v(){var r={line:l,column:p};return function(e){return e.position=new m(r),y(),e}}function m(r){this.start=r,this.end={line:l,column:p},this.source=f.source}function g(e){var n=new Error(f.source+":"+l+":"+p+": "+e);if(n.reason=e,n.filename=f.source,n.line=l,n.column=p,n.source=r,!f.silent)throw n}function d(e){var n=e.exec(r);if(n){var t=n[0];return h(t),r=r.slice(t.length),n}}function y(){d(t)}function x(r){var e;for(r=r||[];e=w();)!1!==e&&r.push(e);return r}function w(){var e=v();if("/"==r.charAt(0)&&"*"==r.charAt(1)){for(var n=2;s!=r.charAt(n)&&("*"!=r.charAt(n)||"/"!=r.charAt(n+1));)++n;if(n+=2,s===r.charAt(n-1))return g("End of comment missing");var t=r.slice(2,n-2);return p+=2,h(t),r=r.slice(n),p+=2,e({type:"comment",comment:t})}}function A(){var r=v(),n=d(o);if(n){if(w(),!d(i))return g("property missing ':'");var t=d(u),f=r({type:"declaration",property:a(n[0].replace(e,s)),value:t?a(t[0].replace(e,s)):s});return d(c),f}}return m.prototype.content=r,y(),function(){var r,e=[];for(x(e);r=A();)!1!==r&&(e.push(r),x(e));return e}()};function p(r,e){var n,t=null;if(!r||"string"!=typeof r)return t;for(var o,i,u=l(r),c="function"==typeof e,f=0,s=u.length;f<s;f++)o=(n=u[f]).property,i=n.value,c?e(o,i,n):i&&(t||(t={}),t[o]=i);return t}return r.exports=p,r.exports.default=p,r.exports})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).StyleToObject=t()}(this,(function(){"use strict";exports.default={};var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,f=/^\s+|\s+$/g,s="";function a(e){return e?e.replace(f,s):s}var c=function(f,c){if("string"!=typeof f)throw new TypeError("First argument must be a string");if(!f)return[];c=c||{};var l=1,p=1;function h(e){var r=e.match(t);r&&(l+=r.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function d(){var e={line:l,column:p};return function(t){return t.position=new v(e),y(),t}}function v(e){this.start=e,this.end={line:l,column:p},this.source=c.source}function m(e){var t=new Error(c.source+":"+l+":"+p+": "+e);if(t.reason=e,t.filename=c.source,t.line=l,t.column=p,t.source=f,!c.silent)throw t}function g(e){var t=e.exec(f);if(t){var r=t[0];return h(r),f=f.slice(r.length),t}}function y(){g(r)}function x(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=d();if("/"==f.charAt(0)&&"*"==f.charAt(1)){for(var t=2;s!=f.charAt(t)&&("*"!=f.charAt(t)||"/"!=f.charAt(t+1));)++t;if(t+=2,s===f.charAt(t-1))return m("End of comment missing");var r=f.slice(2,t-2);return p+=2,h(r),f=f.slice(t),p+=2,e({type:"comment",comment:r})}}function A(){var t=d(),r=g(n);if(r){if(w(),!g(o))return m("property missing ':'");var f=g(u),c=t({type:"declaration",property:a(r[0].replace(e,s)),value:f?a(f[0].replace(e,s)):s});return g(i),c}}return v.prototype.content=f,y(),function(){var e,t=[];for(x(t);e=A();)!1!==e&&(t.push(e),x(t));return t}()};function l(e,t){var r,n=null;if(!e||"string"!=typeof e)return n;for(var o,u,i=c(e),f="function"==typeof t,s=0,a=i.length;s<a;s++)o=(r=i[s]).property,u=r.value,f?t(o,u,r):u&&(n||(n={}),n[o]=u);return n}return{get exports(){return exports.default},set exports(e){exports.default=e}}.exports=l,exports.default.default=l,exports.default})); | ||
//# sourceMappingURL=style-to-object.min.js.map |
{ | ||
"name": "style-to-object", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Converts inline style to object.", | ||
@@ -10,2 +10,3 @@ "author": "Mark <mark@remarkablemark.org>", | ||
"exports": { | ||
"types": "./index.d.ts", | ||
"import": "./index.mjs", | ||
@@ -50,19 +51,19 @@ "require": "./index.js" | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.1", | ||
"@commitlint/config-conventional": "^17.0.0", | ||
"@rollup/plugin-commonjs": "^23.0.0", | ||
"@rollup/plugin-node-resolve": "^15.0.0", | ||
"dtslint": "^4.2.1", | ||
"eslint": "^8.16.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.0", | ||
"mocha": "^10.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.1.0", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.6.2", | ||
"rollup": "^2.75.3", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"typescript": "^4.7.2" | ||
"@commitlint/cli": "17.4.2", | ||
"@commitlint/config-conventional": "17.4.2", | ||
"@rollup/plugin-commonjs": "24.0.0", | ||
"@rollup/plugin-node-resolve": "15.0.1", | ||
"@rollup/plugin-terser": "0.3.0", | ||
"dtslint": "4.2.1", | ||
"eslint": "8.32.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"husky": "8.0.3", | ||
"lint-staged": "13.1.0", | ||
"mocha": "10.2.0", | ||
"npm-run-all": "4.1.5", | ||
"nyc": "15.1.0", | ||
"pinst": "3.0.0", | ||
"prettier": "2.8.3", | ||
"rollup": "2.79.1", | ||
"typescript": "4.9.4" | ||
}, | ||
@@ -69,0 +70,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28131
353