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

@zenfs/core

Package Overview
Dependencies
Maintainers
0
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenfs/core - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

dist/utils.js

@@ -90,2 +90,3 @@ import { dirname, resolve } from './emulation/path.js';

export const setImmediate = typeof globalThis.setImmediate == 'function' ? globalThis.setImmediate : (cb) => setTimeout(cb, 0);
const encoder = new TextEncoder();
/**

@@ -99,4 +100,5 @@ * Encodes a string into a buffer

}
return new Uint8Array(Array.from(input).map(char => char.charCodeAt(0)));
return encoder.encode(input);
}
const decoder = new TextDecoder();
/**

@@ -110,5 +112,3 @@ * Decodes a string from a buffer

}
return Array.from(input)
.map(char => String.fromCharCode(char))
.join('');
return decoder.decode(input);
}

@@ -115,0 +115,0 @@ /**

{
"name": "@zenfs/core",
"version": "1.0.5",
"version": "1.0.6",
"description": "A filesystem, anywhere",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -7,4 +7,2 @@ # ZenFS

ZenFS is a fork of [BrowserFS](https://github.com/jvilk/BrowserFS). If you are using ZenFS in a research paper, you may want to [cite BrowserFS](https://github.com/jvilk/BrowserFS#citing).
## Backends

@@ -109,3 +107,3 @@

if (!exists) {
await writeFile('/myfile.txt', 'Lots of persistant data');
await writeFile('/myfile.txt', 'Lots of persistent data');
}

@@ -167,1 +165,5 @@ ```

Run unit tests with `npm test`.
### BrowserFS Fork
ZenFS is a fork of [BrowserFS](https://github.com/jvilk/BrowserFS). If you are using ZenFS in a research paper, you may want to [cite BrowserFS](https://github.com/jvilk/BrowserFS#citing).

@@ -120,2 +120,4 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-return */

const encoder = new TextEncoder();
/**

@@ -129,5 +131,7 @@ * Encodes a string into a buffer

}
return new Uint8Array(Array.from(input).map(char => char.charCodeAt(0)));
return encoder.encode(input);
}
const decoder = new TextDecoder();
/**

@@ -142,5 +146,3 @@ * Decodes a string from a buffer

return Array.from(input)
.map(char => String.fromCharCode(char))
.join('');
return decoder.decode(input);
}

@@ -147,0 +149,0 @@

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc