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

@epegzz/sass-vars-loader

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epegzz/sass-vars-loader - npm Package Compare versions

Comparing version 4.3.0 to 4.3.1

2

package.json
{
"name": "@epegzz/sass-vars-loader",
"version": "4.3.0",
"version": "4.3.1",
"author": "Daniel Schäfer <epegzz@gmail.com>",

@@ -5,0 +5,0 @@ "description": "A SASS vars loader for Webpack. Load global SASS vars from JS/JSON/Typescript files or from Webpack config.",

@@ -13,5 +13,6 @@ function convertJsToSass(obj, syntax) {

function withQuotes(value) {
function withQuotesIfNecessary(value) {
const hasQuotes = /^['"](\n|.)*['"]$/gm.test(value)
return hasQuotes ? value : `"${value}"`
const requiresQuotes = /^[0 ]/.test(value)
return hasQuotes || !requiresQuotes ? value : `"${value}"`
}

@@ -29,3 +30,3 @@

if (typeof value === 'string') {
return withQuotes(value)
return withQuotesIfNecessary(value)
}

@@ -32,0 +33,0 @@

@@ -5,2 +5,4 @@ const convertJsToSass = require('./convertJsToSass')

{ name: 'converts string', input: { it: 'value' } },
{ name: 'converts string and adds quotes for leading zero', input: { it: '012345' } },
{ name: 'converts string and adds quotes for leading spaces', input: { it: ' value' } },
{ name: 'converts multi line string', input: { it: 'line1\nline2' } },

@@ -7,0 +9,0 @@ { name: 'converts string with single quotes', input: { it: '"value"' } },

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