New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

json-readdir-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-readdir-stream

levelup createReadStream for a directory of json files

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

json-readdir-stream

Build Status npm install

like levelup's createReadStream() for a directory of JSON files

example

var jrs = require('json-readdir-stream')

// takes a directory and an options object, options shown with defaults
var stream = jrs(__dirname + '/json-files', {
    start: '' // start at the beginning
  , end: '' // ..end at the end
  , reverse: false // stream in alphabetical order
  , keys: true // include keys in stream
  , values: true // include values in stream
  , limit: -1 // limit results to value, -1 is no limit
})

stream.pipe(fs.createWriteStream('./db-backup.txt'))

notes

if keys is false, only the values will be streamed (as strings). if values is false, only the keys will be streamed (as strings)

further reading available at levelup's docs

license

MIT

Keywords

levelup

FAQs

Package last updated on 21 Mar 2015

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