Socket
Socket
Sign inDemoInstall

loader-utils

Package Overview
Dependencies
4
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.15 to 0.2.16

19

index.js

@@ -68,3 +68,3 @@ var JSON5 = require("json5");

if(typeof query !== "string")
throw new Error("parseQuery should get a string as first argument");
return query;
if(query.substr(0, 1) !== "?")

@@ -110,12 +110,11 @@ throw new Error("a valid query string passed to parseQuery should begin with '?'");

exports.getLoaderConfig = function(loaderContext, defaultConfigKey) {
if (!defaultConfigKey) {
throw new Error("Default config key missing");
}
var query = exports.parseQuery(loaderContext.query);
var configKey = query.config || defaultConfigKey;
var config = loaderContext.options[configKey] || {};
if (configKey) {
var config = loaderContext.options[configKey] || {};
delete query.config;
return assign({}, config, query);
}
delete query.config;
return assign({}, config, query);
return query;
};

@@ -144,2 +143,4 @@

exports.getRemainingRequest = function(loaderContext) {
if(loaderContext.remainingRequest)
return loaderContext.remainingRequest;
var request = loaderContext.loaders.slice(loaderContext.loaderIndex+1).map(dotRequest).concat([loaderContext.resource]);

@@ -150,2 +151,4 @@ return request.join("!");

exports.getCurrentRequest = function(loaderContext) {
if(loaderContext.currentRequest)
return loaderContext.currentRequest;
var request = loaderContext.loaders.slice(loaderContext.loaderIndex).map(dotRequest).concat([loaderContext.resource]);

@@ -152,0 +155,0 @@ return request.join("!");

{
"name": "loader-utils",
"version": "0.2.15",
"version": "0.2.16",
"author": "Tobias Koppers @sokra",

@@ -5,0 +5,0 @@ "description": "utils for webpack loaders",

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