string-extract-sass-vars 4.0.31 → 4.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -0
- package/LICENSE +2 -2
- package/README.md +2 -2
- package/dist/string-extract-sass-vars.esm.js +3 -3
- package/dist/string-extract-sass-vars.umd.js +3 -3
- package/package.json +3 -3
package/.eslintcache
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/_quickTake.js":"1","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/opts-cb.js":"2","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/throw-if-empty.js":"3","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/perf/check.js":"4","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/rollup.config.js":"5","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/src/main.ts":"6","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/basic.js":"7","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/fixtures.js":"8","/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/opts-cb.js":"9"},{"size":835,"mtime":1760280945963,"results":"10","hashOfConfig":"11"},{"size":502,"mtime":1760280945963,"results":"12","hashOfConfig":"11"},{"size":239,"mtime":1760280945963,"results":"13","hashOfConfig":"11"},{"size":714,"mtime":1760280945963,"results":"14","hashOfConfig":"15"},{"size":373,"mtime":1760280945963,"results":"16","hashOfConfig":"11"},{"size":10456,"mtime":1760280945963,"results":"17","hashOfConfig":"15"},{"size":3676,"mtime":1760280945963,"results":"18","hashOfConfig":"19"},{"size":2365,"mtime":1760280945963,"results":"20","hashOfConfig":"19"},{"size":601,"mtime":1760280945963,"results":"21","hashOfConfig":"19"},{"filePath":"22","messages":"23","suppressedMessages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1f1u168",{"filePath":"25","messages":"26","suppressedMessages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","suppressedMessages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"91l1rm",{"filePath":"34","messages":"35","suppressedMessages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","suppressedMessages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","suppressedMessages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ns3qdb",{"filePath":"43","messages":"44","suppressedMessages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","suppressedMessages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/_quickTake.js",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/opts-cb.js",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/examples/throw-if-empty.js",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/perf/check.js",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/rollup.config.js",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/src/main.ts",[],[],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/basic.js",[],["49","50","51","52"],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/fixtures.js",[],["53","54","55","56","57"],"/home/runner/work/codsen/codsen/packages/string-extract-sass-vars/test/opts-cb.js",[],["58","59","60","61","62","63"],{"ruleId":"64","severity":2,"message":"65","line":3,"column":21,"nodeType":null,"messageId":"66","endLine":3,"endColumn":23,"suppressions":"67"},{"ruleId":"64","severity":2,"message":"68","line":3,"column":33,"nodeType":null,"messageId":"66","endLine":3,"endColumn":37,"suppressions":"69"},{"ruleId":"64","severity":2,"message":"70","line":3,"column":39,"nodeType":null,"messageId":"66","endLine":3,"endColumn":42,"suppressions":"71"},{"ruleId":"64","severity":2,"message":"72","line":3,"column":44,"nodeType":null,"messageId":"66","endLine":3,"endColumn":49,"suppressions":"73"},{"ruleId":"64","severity":2,"message":"65","line":3,"column":21,"nodeType":null,"messageId":"66","endLine":3,"endColumn":23,"suppressions":"74"},{"ruleId":"64","severity":2,"message":"75","line":3,"column":25,"nodeType":null,"messageId":"66","endLine":3,"endColumn":31,"suppressions":"76"},{"ruleId":"64","severity":2,"message":"68","line":3,"column":33,"nodeType":null,"messageId":"66","endLine":3,"endColumn":37,"suppressions":"77"},{"ruleId":"64","severity":2,"message":"70","line":3,"column":39,"nodeType":null,"messageId":"66","endLine":3,"endColumn":42,"suppressions":"78"},{"ruleId":"64","severity":2,"message":"72","line":3,"column":44,"nodeType":null,"messageId":"66","endLine":3,"endColumn":49,"suppressions":"79"},{"ruleId":"64","severity":2,"message":"80","line":3,"column":17,"nodeType":null,"messageId":"66","endLine":3,"endColumn":19,"suppressions":"81"},{"ruleId":"64","severity":2,"message":"65","line":3,"column":21,"nodeType":null,"messageId":"66","endLine":3,"endColumn":23,"suppressions":"82"},{"ruleId":"64","severity":2,"message":"75","line":3,"column":25,"nodeType":null,"messageId":"66","endLine":3,"endColumn":31,"suppressions":"83"},{"ruleId":"64","severity":2,"message":"68","line":3,"column":33,"nodeType":null,"messageId":"66","endLine":3,"endColumn":37,"suppressions":"84"},{"ruleId":"64","severity":2,"message":"70","line":3,"column":39,"nodeType":null,"messageId":"66","endLine":3,"endColumn":42,"suppressions":"85"},{"ruleId":"64","severity":2,"message":"72","line":3,"column":44,"nodeType":null,"messageId":"66","endLine":3,"endColumn":49,"suppressions":"86"},"@typescript-eslint/no-unused-vars","'ok' is defined but never used.","unusedVar",["87"],"'type' is defined but never used.",["88"],"'not' is defined but never used.",["89"],"'match' is defined but never used.",["90"],["91"],"'throws' is defined but never used.",["92"],["93"],["94"],["95"],"'is' is defined but never used.",["96"],["97"],["98"],["99"],["100"],["101"],{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},{"kind":"102","justification":"103"},"directive",""]
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -74,8 +74,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
74
74
|
|
|
75
75
|
## Licence
|
|
76
76
|
|
|
77
|
-
MIT License
|
|
77
|
+
MIT License
|
|
78
78
|
|
|
79
|
-
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
79
|
+
Copyright © 2010-2025 Roy Revelt and other contributors
|
|
80
80
|
|
|
81
81
|
<p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-extract-sass-vars
|
|
3
3
|
* @fileoverview Parse SASS variables file into a plain object of CSS key-value pairs
|
|
4
|
-
* @version 4.0.
|
|
5
|
-
* @author Roy Revelt
|
|
4
|
+
* @version 4.0.33
|
|
5
|
+
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-extract-sass-vars/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var h="4.0.
|
|
10
|
+
var h="4.0.33";var w=h,p="\\",f={throwIfEmpty:!1,cb:null};function y(t,n){if(typeof t!="string")return{};if(n&&typeof n!="object")throw new Error(`string-extract-sass-vars: [THROW_ID_01] the second input argument should be a plain object but it was given as ${JSON.stringify(n,null,4)} (type ${typeof n})`);let o={...f,...n};if(o.cb&&typeof o.cb!="function")throw new Error(`string-extract-sass-vars: [THROW_ID_02] resolvedOpts.cb should be function! But it was given as ${JSON.stringify(n,null,4)} (type ${typeof n})`);let g=t.length,u=null,l=null,$=null,i=null,r=null,c=null,s=!1,a=!1,m=!1,b={};for(let e=0;e<g;e++)!s&&r&&t[e]===r&&t[e-1]!==p?r=null:!r&&!s&&t[e-1]!==p&&`'"`.includes(t[e])&&(r=t[e]),a&&`\r
|
|
11
11
|
`.includes(t[e])&&(a=!1),!s&&t[e]==="/"&&t[e+1]==="/"&&(a=!0),m&&t[e-2]==="*"&&t[e-1]==="/"&&(m=!1),!s&&t[e]==="/"&&t[e+1]==="*"&&(m=!0),s=a||m,!s&&t[e]==="$"&&u===null&&(u=e+1),!s&&l!==null&&!r&&t[e]===";"&&(i=t.slice(`"'`.includes(t[l])?l+1:l,(c||0)+1),/^-?\d*\.?\d*$/.test(i)&&(i=+i),b[$]=o.cb?o.cb(i):i,u=null,l=null,$=null,i=null),!s&&$!==null&&t[e]?.trim()&&l===null&&(l=e),!s&&!$&&u!==null&&t[e]===":"&&!r&&($=t.slice(u,e)),`'"`.includes(t[e])||(c=e);if(!Object.keys(b).length&&o.throwIfEmpty)throw new Error("string-extract-sass-vars: [THROW_ID_03] no keys extracted! (setting resolvedOpts.opts)");return b}export{f as defaults,y as extractVars,w as version};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-extract-sass-vars
|
|
3
3
|
* @fileoverview Parse SASS variables file into a plain object of CSS key-value pairs
|
|
4
|
-
* @version 4.0.
|
|
5
|
-
* @author Roy Revelt
|
|
4
|
+
* @version 4.0.33
|
|
5
|
+
* @author Roy Revelt
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-extract-sass-vars/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var stringExtractSassVars=(()=>{var c=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))v.call(t,n)&&d(e,n,t[n]);if(f)for(var n of f(t))N.call(t,n)&&d(e,n,t[n]);return e};var x=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},D=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of O(t))!v.call(e,l)&&l!==n&&c(e,l,{get:()=>t[l],enumerable:!(a=V(t,l))||a.enumerable});return e};var C=e=>D(c({},"__esModule",{value:!0}),e);var J={};x(J,{defaults:()=>E,extractVars:()=>j,version:()=>k});var w="4.0.
|
|
10
|
+
"use strict";var stringExtractSassVars=(()=>{var c=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))v.call(t,n)&&d(e,n,t[n]);if(f)for(var n of f(t))N.call(t,n)&&d(e,n,t[n]);return e};var x=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},D=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of O(t))!v.call(e,l)&&l!==n&&c(e,l,{get:()=>t[l],enumerable:!(a=V(t,l))||a.enumerable});return e};var C=e=>D(c({},"__esModule",{value:!0}),e);var J={};x(J,{defaults:()=>E,extractVars:()=>j,version:()=>k});var w="4.0.33";var k=w,y="\\",E={throwIfEmpty:!1,cb:null};function j(e,t){var S;if(typeof e!="string")return{};if(t&&typeof t!="object")throw new Error("string-extract-sass-vars: [THROW_ID_01] the second input argument should be a plain object but it was given as ".concat(JSON.stringify(t,null,4)," (type ").concat(typeof t,")"));let n=p(p({},E),t);if(n.cb&&typeof n.cb!="function")throw new Error("string-extract-sass-vars: [THROW_ID_02] resolvedOpts.cb should be function! But it was given as ".concat(JSON.stringify(t,null,4)," (type ").concat(typeof t,")"));let a=e.length,l=null,r=null,$=null,o=null,u=null,g=null,i=!1,m=!1,b=!1,h={};for(let s=0;s<a;s++)!i&&u&&e[s]===u&&e[s-1]!==y?u=null:!u&&!i&&e[s-1]!==y&&"'\"".includes(e[s])&&(u=e[s]),m&&"\r\n".includes(e[s])&&(m=!1),!i&&e[s]==="/"&&e[s+1]==="/"&&(m=!0),b&&e[s-2]==="*"&&e[s-1]==="/"&&(b=!1),!i&&e[s]==="/"&&e[s+1]==="*"&&(b=!0),i=m||b,!i&&e[s]==="$"&&l===null&&(l=s+1),!i&&r!==null&&!u&&e[s]===";"&&(o=e.slice("\"'".includes(e[r])?r+1:r,(g||0)+1),/^-?\d*\.?\d*$/.test(o)&&(o=+o),h[$]=n.cb?n.cb(o):o,l=null,r=null,$=null,o=null),!i&&$!==null&&((S=e[s])!=null&&S.trim())&&r===null&&(r=s),!i&&!$&&l!==null&&e[s]===":"&&!u&&($=e.slice(l,s)),"'\"".includes(e[s])||(g=s);if(!Object.keys(h).length&&n.throwIfEmpty)throw new Error("string-extract-sass-vars: [THROW_ID_03] no keys extracted! (setting resolvedOpts.opts)");return h}return C(J);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "string-extract-sass-vars",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.33",
|
|
4
4
|
"description": "Parse SASS variables file into a plain object of CSS key-value pairs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
46
46
|
"lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
47
47
|
"letspublish": "npm publish --provenance || :",
|
|
48
|
-
"lint": "eslint . --fix",
|
|
48
|
+
"lint": "eslint . --fix --concurrency=auto --cache",
|
|
49
49
|
"perf": "node perf/check.js",
|
|
50
50
|
"prep": "echo 'ready'",
|
|
51
51
|
"prettier": "prettier",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"various": {}
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"color-shorthand-hex-to-six-digit": "^5.0.
|
|
76
|
+
"color-shorthand-hex-to-six-digit": "^5.0.31"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"registry": "https://registry.npmjs.org/"
|