Socket
Book a DemoInstallSign in
Socket

nicely-placed-modification-logs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nicely-placed-modification-logs

write modifications/events to append only logs. process those changes sequentially. like an _changes feed but from disk

latest
Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

nicely-placed-modification-logs

write modifications/events to append only logs. process those changes sequentially. like an _changes feed but in a file

##work in progress

var dir = __dirname+"/data"
var modlogs = require('nicely-placed-modification-logs')
var logs = modlogs({dir:__dirname+"/data"})

logs.on("error",function(err){
  console.log(err!)
})

logs.write({data:"important stufff"},function(err){
  // saved!
})

var s = modlogs.read({dir:,since:0})

s.on('data',function(event){
  console.log(event.seq)
  // [log name]-[bytewise encoded byte offset]
  // 000000000-420000000000000000
  console.log(event.data)
  // "hi!\n"  
})

Keywords

changes

FAQs

Package last updated on 12 Aug 2016

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