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

css-resolve-import

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-resolve-import - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "css-resolve-import",
"version": "0.1.0",
"version": "0.1.1",
"description": "Resolves @import statements in CSS",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -9,3 +9,4 @@ module.exports = parse

var importMatcher = /@import +(?:url\()?([^()]+)\)?(:? *;)?/g
var urlMatcher = /url\(["']?([^"'()]+?)(?:\?.*?)?["']?\)/g
var urlMatcher = /url\(["']?((?:[^"'()]+?)(?:\?.*?)?)["']?\)/g
var queryParamsMatcher = /(\?.*)$/i
var urlWithScheme = /^(?:[a-z][a-z-+.0-9]*:)?\/\//i

@@ -29,2 +30,3 @@ var absoluteUrl = /^\//i

if(!url.match(dataUrl) && !url.match(urlWithScheme) && !url.match(absoluteUrl)) {
url = url.replace(queryParamsMatcher, '')
url = path.join(relRoot, url).replace(/\\/g, '/')

@@ -31,0 +33,0 @@ }

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