Home Reference Source Repository
public class | source

CDXJReader

CDXJReader that provides two means to read a cdxj file

Example:

const cdxjStream = CDXJReader.createReadStream('<path-to-cdxj-file>')
cdxjStream.on('data', cdxjEntry => { console.log(cdxjEntry) })

Static Method Summary

Static Public Methods
public static

Parse a cdxj file.

public static

Read a cdxj file in its entirety

Static Public Methods

public static createReadStream(cdxjPath: string): ReadableStream<CDXJEntry> source

Parse a cdxj file. Returns a Readable Stream which emits CDXJEntrys

Params:

NameTypeAttributeDescription
cdxjPath string

the path to the cdxj file to parse, supports ~ paths

public static readCDXJ(cdxjPath: string): Promise<CDXJEntry[], Error> source

Read a cdxj file in its entirety

Params:

NameTypeAttributeDescription
cdxjPath string

the path to the cdxj file to parse, supports ~ paths

Return:

Promise<CDXJEntry[], Error>