Socket
Socket
Sign inDemoInstall

real-time-file

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    real-time-file

live readable+writable representation of a file


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Install size
33.5 kB
Created
Weekly downloads
 

Readme

Source

real-time-file

live readable+writable representation of a file

Build Status tested with jest npm version Dependencies Status Greenkeeper badge semantic-release badge License: MIT

Example

const RealTimeFile = require('real-time-file')

const file = new RealTimeFile('.gitignore')
file.on('text', text => {})
file.on('lines', lines => {})
file.ready
  .then(() => {
    file.lines.unshift('package-lock.json')
    // or
    file.lines = ['package-lock.json', ...lines]
    // or
    file.text = `package-lock.json\n${file.text}`
  })
  .catch(console.error)
  • saves new contents to file system immediately
  • watches the file and reloads when changed by another process

FAQs

Last updated on 20 Mar 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc