Nighttime Peanut Migrations
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

node-zoom2

0.3.0 • Public • Published

NODE-ZOOM2

npm package

Build Status Coverage Status

Requirements

Debian/Ubuntu

sudo apt-get install -y libyaz5-dev

Mac

brew install yaz

Installation

npm i node-zoom2

Common Installation Issues

If libyaz5-dev is not available on your distributions package manager by default run (or have a look at)

./preinstall.sh

Which will initalize the IndexData repository

Example

var zoom = require('node-zoom2');
 
zoom.connection('192.83.186.170:210/INNOPAC')
.set('preferredRecordSyntax', 'usmarc')
.query('prefix', '@attr 1=7 ' + '9780073383095')
.createReadStream()
.on('data', function (record) {
  console.log(record.json, record.xml, record.raw);
})
.on('close', function(close) {
  process.exit(1);
})

API

Connection

  • #set(optName, optValue)
  • #get(optName)
  • #query([type], querystring)
  • #search(callback)
  • #createReadStream([options])

ResultSet

  • .size
  • #getRecords(start, count, callback)

Records

  • #hasNext()
  • #next()

Record

  • .json
  • .database
  • .syntax
  • .schema
  • .render
  • .raw
  • .xml
  • .txml

Keywords

install

npm i node-zoom2

Downloadsweekly downloads

24

version

0.3.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability