New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

manifest-rev

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

manifest-rev - npm Package Compare versions

Comparing version

to
1.0.1

package-lock.json

7

index.js

@@ -1,4 +0,4 @@

const PROD = process.env.NODE_ENV === 'production';
module.exports = function(opts) {
const PROD = process.env.NODE_ENV === 'production';
module.exports = function(opts) {
if (typeof opts !== 'object') {

@@ -32,3 +32,4 @@ throw new TypeError('`options` argument required');

const val = String((manifest[str] && manifest[str][prop]) || str);
output = prop === 'path' ? opts.prepend + val : val;
if (prop === 'path') return opts.prepend + val;
output = PROD ? val : false;
}

@@ -35,0 +36,0 @@ } catch (err) {}

{
"name": "manifest-rev",
"description": "Dynamically load assets into your views, emails, etc. from your `rev-manifest.json` manifest revision file",
"version": "1.0.0",
"version": "1.0.1",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -6,0 +6,0 @@ "bugs": {

@@ -78,6 +78,3 @@ const path = require('path');

const manifest = path.join(__dirname, 'fixtures', 'rev-manifest.json');
t.is(
manifestRev({ manifest })('script.js', 'integrity'),
'sha256-YEWYfCFP9yc5DAF8K5AtLEyFuKZ1MNw+xQPm8g70LYY='
);
t.is(manifestRev({ manifest })('script.js', 'integrity'), false);
});

@@ -84,0 +81,0 @@

Sorry, the diff of this file is not supported yet