Socket
Socket
Sign inDemoInstall

string-extract-sass-vars

Package Overview
Dependencies
0
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.10 to 4.0.11

4

dist/string-extract-sass-vars.esm.js
/**
* @name string-extract-sass-vars
* @fileoverview Parse SASS variables file into a plain object of CSS key-value pairs
* @version 4.0.10
* @version 4.0.11
* @author Roy Revelt, Codsen Ltd

@@ -10,3 +10,3 @@ * @license MIT

var h="4.0.10";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 r={...f,...n};if(r.cb&&typeof r.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,o=null,c=null,s=!1,a=!1,m=!1,b={};for(let e=0;e<g;e++)!s&&o&&t[e]===o&&t[e-1]!==p?o=null:!o&&!s&&t[e-1]!==p&&`'"`.includes(t[e])&&(o=t[e]),a&&`\r
var h="4.0.11";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 r={...f,...n};if(r.cb&&typeof r.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,o=null,c=null,s=!1,a=!1,m=!1,b={};for(let e=0;e<g;e++)!s&&o&&t[e]===o&&t[e-1]!==p?o=null:!o&&!s&&t[e-1]!==p&&`'"`.includes(t[e])&&(o=t[e]),a&&`\r
`.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&&!o&&t[e]===";"&&(i=t.slice(`"'`.includes(t[l])?l+1:l,(c||0)+1),/^-?\d*\.?\d*$/.test(i)&&(i=+i),b[$]=r.cb?r.cb(i):i,u=null,l=null,$=null,i=null),!s&&$!==null&&t[e]&&t[e].trim().length&&l===null&&(l=e),!s&&!$&&u!==null&&t[e]===":"&&!o&&($=t.slice(u,e)),`'"`.includes(t[e])||(c=e);if(!Object.keys(b).length&&r.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};
/**
* @name string-extract-sass-vars
* @fileoverview Parse SASS variables file into a plain object of CSS key-value pairs
* @version 4.0.10
* @version 4.0.11
* @author Roy Revelt, Codsen Ltd

@@ -10,3 +10,3 @@ * @license MIT

"use strict";var stringExtractSassVars=(()=>{var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var f=(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={}))d.call(t,n)&&f(e,n,t[n]);if(S)for(var n of S(t))O.call(t,n)&&f(e,n,t[n]);return e};var x=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},N=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of V(t))!d.call(e,l)&&l!==n&&c(e,l,{get:()=>t[l],enumerable:!(a=E(t,l))||a.enumerable});return e};var D=e=>N(c({},"__esModule",{value:!0}),e);var j={};x(j,{defaults:()=>y,extractVars:()=>k,version:()=>A});var v="4.0.10";var A=v,w="\\",y={throwIfEmpty:!1,cb:null};function k(e,t){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 ${JSON.stringify(t,null,4)} (type ${typeof t})`);let n=p(p({},y),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 ${JSON.stringify(t,null,4)} (type ${typeof t})`);let a=e.length,l=null,o=null,$=null,r=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]!==w?u=null:!u&&!i&&e[s-1]!==w&&`'"`.includes(e[s])&&(u=e[s]),m&&`\r
"use strict";var stringExtractSassVars=(()=>{var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols;var d=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var f=(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={}))d.call(t,n)&&f(e,n,t[n]);if(S)for(var n of S(t))O.call(t,n)&&f(e,n,t[n]);return e};var x=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},N=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of V(t))!d.call(e,l)&&l!==n&&c(e,l,{get:()=>t[l],enumerable:!(a=E(t,l))||a.enumerable});return e};var D=e=>N(c({},"__esModule",{value:!0}),e);var j={};x(j,{defaults:()=>y,extractVars:()=>k,version:()=>A});var v="4.0.11";var A=v,w="\\",y={throwIfEmpty:!1,cb:null};function k(e,t){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 ${JSON.stringify(t,null,4)} (type ${typeof t})`);let n=p(p({},y),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 ${JSON.stringify(t,null,4)} (type ${typeof t})`);let a=e.length,l=null,o=null,$=null,r=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]!==w?u=null:!u&&!i&&e[s-1]!==w&&`'"`.includes(e[s])&&(u=e[s]),m&&`\r
`.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&&o!==null&&!u&&e[s]===";"&&(r=e.slice(`"'`.includes(e[o])?o+1:o,(g||0)+1),/^-?\d*\.?\d*$/.test(r)&&(r=+r),h[$]=n.cb?n.cb(r):r,l=null,o=null,$=null,r=null),!i&&$!==null&&e[s]&&e[s].trim().length&&o===null&&(o=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 D(j);})();
{
"name": "string-extract-sass-vars",
"version": "4.0.10",
"version": "4.0.11",
"description": "Parse SASS variables file into a plain object of CSS key-value pairs",

@@ -76,4 +76,4 @@ "keywords": [

"devDependencies": {
"color-shorthand-hex-to-six-digit": "^5.0.8"
"color-shorthand-hex-to-six-digit": "^5.0.9"
}
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc