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

mem-fs-editor

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mem-fs-editor - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

11

lib/actions/copy-tpl.js

@@ -9,10 +9,13 @@ 'use strict';

context = context || {};
// Setting filename by default allow including partials.
tplSettings = extend({filename: from}, tplSettings || {});
this.copy(from, to, {
process: function (contents) {
return ejs.render(contents.toString(), context, tplSettings);
process: function (contents, filename) {
return ejs.render(
contents.toString(),
context,
// Setting filename by default allow including partials.
extend({filename: filename}, tplSettings || {})
);
}
});
};

@@ -12,4 +12,4 @@ 'use strict';

function applyProcessingFunc(process, contents) {
var output = process(contents);
function applyProcessingFunc(process, contents, filename) {
var output = process(contents, filename);
return output instanceof Buffer ? output : new Buffer(output);

@@ -52,3 +52,3 @@ }

if (options.process) {
contents = applyProcessingFunc(options.process, file.contents);
contents = applyProcessingFunc(options.process, file.contents, file.path);
}

@@ -55,0 +55,0 @@

@@ -12,3 +12,3 @@ 'use strict';

file.state = 'deleted';
file.contents = new Buffer('');
file.contents = null;
store.add(file);

@@ -15,0 +15,0 @@ }

{
"name": "mem-fs-editor",
"version": "2.2.0",
"version": "2.2.1",
"description": "File edition helpers working on top of mem-fs",

@@ -19,3 +19,3 @@ "scripts": {

"ejs": "^2.3.1",
"glob": "^6.0.1",
"glob": "^7.0.3",
"globby": "^4.0.0",

@@ -22,0 +22,0 @@ "mkdirp": "^0.5.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