Gathering detailed insights and metrics for node-sass-json-vars
Gathering detailed insights and metrics for node-sass-json-vars
npm install node-sass-json-vars
Typescript
Module System
Node Version
NPM Version
60.9
Supply Chain
96
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (85.25%)
SCSS (14.75%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,569
Last Day
2
Last Week
2
Last Month
10
Last Year
222
MIT License
22 Commits
1 Watchers
10 Branches
2 Contributors
Updated on Jun 11, 2024
Minified
Minified + Gzipped
Latest Version
2.0.0
Package Id
node-sass-json-vars@2.0.0
Unpacked Size
8.09 kB
Size
3.56 kB
File Count
6
NPM Version
10.1.0
Node Version
20.9.0
Published on
Nov 20, 2023
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
-33.3%
2
Compared to previous week
Last Month
-44.4%
10
Compared to previous month
Last Year
-30.8%
222
Compared to previous year
This module defines additional built-in Sass functions that allow using variables from .json
files in .scss
files.
1npm install --save-dev node-sass-json-vars
Note: it's recommended to install node-sass-json-vars locally project by project.
1const sassFunctions = require('node-sass-json-vars'); 2 3module.exports = { 4... 5 { 6 test: /\.scss$/, 7 use: [ 8 'style-loader', 9 'css-loader', 10 { 11 loader: "sass-loader", 12 options: { 13 sassOptions: { 14 functions: sassFunctions, 15 }, 16 }, 17 }, 18 ], 19 }, 20... 21}
getMapFromJSON($key, $config)
: transforms a JSON Object into a SASS Map.
"colors"
"/path/to/variables.json"
. Defaults to config/variables.json
config/variables.json
1{ 2 "colors": { 3 "catalina-blue": "#1D3557", 4 "charlotte": "#A8DADC", 5 "panache": "#F1FAEE", 6 "amaranth": "#E63946", 7 "jelly-bean": "#457B9D" 8 } 9}
_colors.scss
1$colors: getMapFromJSON("colors"); 2 3:root { 4 // Brand colours. 5 @each $colorName, $colorHex in $colors { 6 --color-#{$colorName}: #{$colorHex}; 7 } 8}
style.css
1:root { 2 --color-catalina-blue: #1d3557; 3 --color-charlotte: #a8dadc; 4 --color-panache: #f1faee; 5 --color-amaranth: #e63946; 6 --color-jelly-bean: #457b9d; 7}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
project is archived
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
11 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More