string-extract-sass-vars 3.0.6 → 3.0.7
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.
|
@@ -1,13 +1,13 @@
|
|
|
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 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-extract-sass-vars/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var version$1 = "3.0.
|
|
10
|
+
var version$1 = "3.0.7";
|
|
11
11
|
|
|
12
12
|
const version = version$1;
|
|
13
13
|
const BACKSLASH = "\u005C";
|
|
@@ -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 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-extract-sass-vars/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).stringExtractSassVars={})}(this,(function(t){"use strict";const e={throwIfEmpty:!1,cb:null};t.defaults=e,t.extractVars=function(t,n){if("string"!=typeof t)return{};if(n&&"object"!=typeof n)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})`);const l={...e,...n};if(l.cb&&"function"!=typeof l.cb)throw new Error(`string-extract-sass-vars: [THROW_ID_02] opts.cb should be function! But it was given as ${JSON.stringify(n,null,4)} (type ${typeof n})`);const s=t.length;let r=null,o=null,i=null,u=null,c=null,f=null,a=!1,d=!1,p=!1;const y={};for(let e=0;e<s;e++)!a&&c&&t[e]===c&&"\\"!==t[e-1]?c=null:c||a||"\\"===t[e-1]||!"'\"".includes(t[e])||(c=t[e]),d&&"\r\n".includes(t[e])&&(d=!1),a||"/"!==t[e]||"/"!==t[e+1]||(d=!0),p&&"*"===t[e-2]&&"/"===t[e-1]&&(p=!1),a||"/"!==t[e]||"*"!==t[e+1]||(p=!0),a=d||p,a||"$"!==t[e]||null!==r||(r=e+1),a||null===o||c||";"!==t[e]||(u=t.slice("\"'".includes(t[o])?o+1:o,(f||0)+1),/^-?\d*\.?\d*$/.test(u)&&(u=+u),y[i]=l.cb?l.cb(u):u,r=null,o=null,i=null,u=null),!a&&null!==i&&t[e]&&t[e].trim().length&&null===o&&(o=e),a||i||null===r||":"!==t[e]||c||(i=t.slice(r,e)),"'\"".includes(t[e])||(f=e);if(!Object.keys(y).length&&l.throwIfEmpty)throw new Error("string-extract-sass-vars: [THROW_ID_03] no keys extracted! (setting opts.originalOpts)");return y},t.version="3.0.
|
|
10
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).stringExtractSassVars={})}(this,(function(t){"use strict";const e={throwIfEmpty:!1,cb:null};t.defaults=e,t.extractVars=function(t,n){if("string"!=typeof t)return{};if(n&&"object"!=typeof n)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})`);const l={...e,...n};if(l.cb&&"function"!=typeof l.cb)throw new Error(`string-extract-sass-vars: [THROW_ID_02] opts.cb should be function! But it was given as ${JSON.stringify(n,null,4)} (type ${typeof n})`);const s=t.length;let r=null,o=null,i=null,u=null,c=null,f=null,a=!1,d=!1,p=!1;const y={};for(let e=0;e<s;e++)!a&&c&&t[e]===c&&"\\"!==t[e-1]?c=null:c||a||"\\"===t[e-1]||!"'\"".includes(t[e])||(c=t[e]),d&&"\r\n".includes(t[e])&&(d=!1),a||"/"!==t[e]||"/"!==t[e+1]||(d=!0),p&&"*"===t[e-2]&&"/"===t[e-1]&&(p=!1),a||"/"!==t[e]||"*"!==t[e+1]||(p=!0),a=d||p,a||"$"!==t[e]||null!==r||(r=e+1),a||null===o||c||";"!==t[e]||(u=t.slice("\"'".includes(t[o])?o+1:o,(f||0)+1),/^-?\d*\.?\d*$/.test(u)&&(u=+u),y[i]=l.cb?l.cb(u):u,r=null,o=null,i=null,u=null),!a&&null!==i&&t[e]&&t[e].trim().length&&null===o&&(o=e),a||i||null===r||":"!==t[e]||c||(i=t.slice(r,e)),"'\"".includes(t[e])||(f=e);if(!Object.keys(y).length&&l.throwIfEmpty)throw new Error("string-extract-sass-vars: [THROW_ID_03] no keys extracted! (setting opts.originalOpts)");return y},t.version="3.0.7",Object.defineProperty(t,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "string-extract-sass-vars",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Parse SASS variables file into a plain object of CSS key-value pairs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -99,21 +99,21 @@
|
|
|
99
99
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
100
100
|
"@rollup/plugin-strip": "^2.1.0",
|
|
101
101
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
102
|
-
"@types/node": "^16.11.
|
|
102
|
+
"@types/node": "^16.11.10",
|
|
103
103
|
"@types/tap": "^15.0.5",
|
|
104
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
105
|
-
"@typescript-eslint/parser": "^5.
|
|
106
|
-
"core-js": "^3.19.
|
|
104
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
105
|
+
"@typescript-eslint/parser": "^5.5.0",
|
|
106
|
+
"core-js": "^3.19.2",
|
|
107
107
|
"cross-env": "^7.0.3",
|
|
108
108
|
"eslint": "^8.3.0",
|
|
109
|
-
"lect": "^0.18.
|
|
110
|
-
"rollup": "^2.60.
|
|
109
|
+
"lect": "^0.18.7",
|
|
110
|
+
"rollup": "^2.60.1",
|
|
111
111
|
"rollup-plugin-ascii": "^0.0.3",
|
|
112
112
|
"rollup-plugin-banner": "^0.2.1",
|
|
113
113
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
114
114
|
"rollup-plugin-dts": "^4.0.1",
|
|
115
115
|
"rollup-plugin-terser": "^7.0.2",
|
|
116
|
-
"tap": "^15.1.
|
|
116
|
+
"tap": "^15.1.5",
|
|
117
117
|
"tslib": "^2.3.1",
|
|
118
118
|
"typescript": "^4.5.2"
|
|
119
119
|
},
|