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 3.0.0 to 3.0.1

13

lib/actions/copy.js

@@ -10,3 +10,2 @@ 'use strict';

var multimatch = require('multimatch');
var File = require('vinyl');
var util = require('../util');

@@ -19,3 +18,3 @@

exports.copy = function(from, to, options) {
exports.copy = function (from, to, options) {
from = util.globify(from);

@@ -25,6 +24,6 @@ to = path.resolve(to);

var globOptions = extend(options.globOptions || {}, { nodir: true });
var globOptions = extend(options.globOptions || {}, {nodir: true});
var diskFiles = globby.sync(from, globOptions);
var storeFiles = [];
this.store.each((file) => {
this.store.each(file => {
if (multimatch([file.path], from).length !== 0) {

@@ -44,6 +43,6 @@ storeFiles.push(file.path);

var root = util.getCommonPath(from);
generateDestination = (filepath) => {
generateDestination = filepath => {
var toFile = path.relative(root, filepath);
return path.join(to, toFile);
}
};
}

@@ -54,3 +53,3 @@

files.forEach((file) => {
files.forEach(file => {
this._copySingle(file, generateDestination(file), options);

@@ -57,0 +56,0 @@ });

'use strict';
var assert = require('assert');
var path = require('path');

@@ -5,0 +4,0 @@ var globby = require('globby');

'use strict';
var assert = require('assert');
module.exports = function (filepath, options) {
options = options || { raw: false };
options = options || {raw: false};
var file = this.store.get(filepath);

@@ -8,0 +6,0 @@

@@ -21,6 +21,7 @@ 'use strict';

filePath = this.globify(filePath);
var globStartIndex = filePath.indexOf('*');
if (globStartIndex !== -1) {
filePath = filePath.substring(0, globStartIndex + 1);
} else if (fs.existsSync(filePath) && fs.statSync(filePath).isDirectory()) {
return filePath;
}

@@ -27,0 +28,0 @@

{
"name": "mem-fs-editor",
"version": "3.0.0",
"version": "3.0.1",
"description": "File edition helpers working on top of mem-fs",
"scripts": {
"test": "jest && eslint **/*.js",
"pretest": "eslint **/*.js",
"test": "jest",
"prepublish": "nsp check"

@@ -8,0 +9,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