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

asset-resolver

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

asset-resolver - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

index.js

@@ -29,5 +29,3 @@ /**

return resolver.getResource(base, file, opts);
})).then(function (resource) {
return resource;
}).catch(Promise.AggregateError, function (errs) {
})).catch(Promise.AggregateError, function (errs) {
var msg = ['The file "' + file + '" could not be resolved because of:'].concat(pluck(errs, 'message'));

@@ -34,0 +32,0 @@ debug(msg);

@@ -30,2 +30,3 @@ /**

}
debug('Passed filter:', resource.path);
return resource;

@@ -44,3 +45,3 @@ });

followRedirect: true,
encoding: 'binary'
encoding: null
};

@@ -81,6 +82,7 @@ return new Promise(function (resolve, reject) {

var mimeType = mime.lookup(resource);
debug('Fetched:', resource);
return Promise.resolve({
contents: body.toString(),
contents: body,
path: resource,

@@ -87,0 +89,0 @@ mime: mimeType

{
"name": "asset-resolver",
"version": "0.1.0",
"version": "0.1.1",
"description": "Find an asset in a set of locations",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -53,3 +53,4 @@ # asset-resolver [![Build Status](https://travis-ci.org/bezoerb/asset-resolver.svg?branch=master)](https://travis-ci.org/bezoerb/asset-resolver)

Required: `false`
Example: ```javascript
Example:
```javascript
resolver.getResource('my.svg',{

@@ -56,0 +57,0 @@ base: ['some/directory','http://some.domain/assets'],

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