Socket
Socket
Sign inDemoInstall

mem-fs-editor

Package Overview
Dependencies
Maintainers
1
Versions
52
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.1 to 3.0.2

8

lib/actions/copy.js

@@ -18,11 +18,11 @@ 'use strict';

exports.copy = function (from, to, options) {
from = util.globify(from);
to = path.resolve(to);
options = options || {};
var fromGlob = util.globify(from);
var globOptions = extend(options.globOptions || {}, {nodir: true});
var diskFiles = globby.sync(from, globOptions);
var diskFiles = globby.sync(fromGlob, globOptions);
var storeFiles = [];
this.store.each(file => {
if (multimatch([file.path], from).length !== 0) {
if (multimatch([file.path], fromGlob).length !== 0) {
storeFiles.push(file.path);

@@ -34,3 +34,3 @@ }

var generateDestination = () => to;
if (Array.isArray(from) || glob.hasMagic(from)) {
if (Array.isArray(from) || !this.exists(from) || glob.hasMagic(from)) {
assert(

@@ -37,0 +37,0 @@ !this.exists(to) || fs.statSync(to).isDirectory(),

'use strict';
module.exports = function (filepath) {
var file = this.store.get(filepath);
var file = this.store.get(filepath);
return file.contents !== null && file.state !== 'deleted';
return file.contents !== null && file.state !== 'deleted';
};
{
"name": "mem-fs-editor",
"version": "3.0.1",
"version": "3.0.2",
"description": "File edition helpers working on top of mem-fs",

@@ -5,0 +5,0 @@ "scripts": {

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