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

memfs-browser

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

memfs-browser

In-memory file-system with Node's fs API.

  • 4.6.10002
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

memfs-browser

memfs UMD and ESM bundle for browser.

The code shipped in this package is not transpiled by babel.

Version explanation

memfs: major.minor.patch  -->  memfs-browser: major.minor.1{patch:2}{build:2}

example:

3.5.3  -->  3.5.103xx
4.6.0  -->  4.6.100xx

Usage

npm install memfs-browser
  • HTML <script>

    <script src="your-buffer-polyfill-that-set-globalThis-Buffer"></script>
    <script src="./node_modules/memfs-browser/dist/memfs.min.js"></script>
    <script src="./index.js"></script>
    
    // index.js
    
    /// <reference path="./node_modules/memfs-browser/index.d.ts" />
    
    console.log(memfs.versions.memfs) // original memfs version
    console.log(memfs.versions.build) // version of current build
    console.log(memfs.path) // path-browserify
    
  • HTML <script type="module">

    <script type="importmap">
      {
        "imports": {
          "memfs-browser": "./node_modules/memfs-browser/dist/memfs.esm.min.js"
        }
      }
    </script>
    <script src="your-buffer-polyfill-that-set-globalThis-Buffer"></script>
    <script type="module" src="./index.js"></script>
    
    import * as memfs from 'memfs-browser'
    
    console.log(memfs.versions.memfs) // original memfs version
    console.log(memfs.versions.build) // version of current build
    console.log(memfs.path) // path-browserify
    
  • Webpack

    npm install buffer
    
    module.exports = {
      resolve: {
        alias: {
          buffer: require.resolve('buffer/')
        }
      }
    }
    
    import * as memfs from 'memfs-browser'
    // const memfs = require('memfs-browser')
    
    console.log(memfs.versions.memfs) // original memfs version
    console.log(memfs.versions.build) // version of current build
    console.log(memfs.path) // path-browserify
    

Keywords

FAQs

Package last updated on 10 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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