Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 411 Bytes

readme.md

File metadata and controls

17 lines (14 loc) · 411 Bytes

dom-filesystem

Use the Node.js fs API inside Javascript and store the data inside the DOM, good for creating quines.

Installing

npm add dom-filesystem yarn add dom-filesystem

Using

let fs = require("dom-filesystem")(document)

function async main() {
  fs.writeFileSync( "/hello-world.txt", "hello-world")
  let result = fs.readFileSync("/hello-world.txt")
  console.log( result )
}