Socket
Socket
Sign inDemoInstall

memfs

Package Overview
Dependencies
10
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.1 to 4.2.2

4

lib/node.d.ts

@@ -79,5 +79,3 @@ /// <reference types="node" />

parent: Link;
children: {
[child: string]: Link | undefined;
};
children: Map<string, Link | undefined>;
private _steps;

@@ -84,0 +82,0 @@ node: Node;

@@ -251,3 +251,3 @@ "use strict";

this._steps = val;
for (const [child, link] of Object.entries(this.children)) {
for (const [child, link] of this.children.entries()) {
if (child === '.' || child === '..') {

@@ -261,3 +261,3 @@ continue;

super();
this.children = {};
this.children = new Map();
// Path to this node as Array: ['usr', 'bin', 'node'].

@@ -285,3 +285,3 @@ this._steps = [];

if (node.isDirectory()) {
link.children['.'] = link;
link.children.set('.', link);
link.getNode().nlink++;

@@ -293,3 +293,3 @@ }

setChild(name, link = new Link(this.vol, this, name)) {
this.children[name] = link;
this.children.set(name, link);
link.parent = this;

@@ -299,3 +299,3 @@ this.length++;

if (node.isDirectory()) {
link.children['..'] = this;
link.children.set('..', this);
this.getNode().nlink++;

@@ -310,6 +310,6 @@ }

if (node.isDirectory()) {
delete link.children['..'];
link.children.delete('..');
this.getNode().nlink--;
}
delete this.children[link.getName()];
this.children.delete(link.getName());
this.length--;

@@ -321,5 +321,3 @@ this.getNode().mtime = new Date();

this.getNode().mtime = new Date();
if (Object.hasOwnProperty.call(this.children, name)) {
return this.children[name];
}
return this.children.get(name);
}

@@ -363,3 +361,3 @@ getPath() {

ino: this.ino,
children: Object.keys(this.children),
children: Array.from(this.children.keys()),
};

@@ -366,0 +364,0 @@ }

{
"name": "memfs",
"version": "4.2.1",
"version": "4.2.2",
"description": "In-memory file-system with Node's fs API.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc