2.2.6 • Published 5 years ago

@elanthia/koschei v2.2.6

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

@elanthia/koschei Build Status

Typescript, event-driven, Stream support, perfect for your next integration with Gemstone like building Electron apps, TUIs, or whatever. Wraps a SAX-based parser with robust error recovery and a stack-driven approach.

Features:

  1. handles monsterbold elegantly by reducing arbitrarily nested <pushBold> > <a> tags to <monster>
  2. maps ugly <pushBold> | </popBold> tags to <b> | </b> like sane people should
  3. should handle all of the ugly cases of the XML-like feed for you

Example:

import net           from "net"
import {Parser, Tag} from "@elanthia/koschei"
// make our parser instance
const parser = Parser.of()
// open a socket to a Game feed 
// doesn't have to be Lich, but most people are familiar with it
const lich   = net.connect({port: LICH_PORT_OR_WHATEVER})
// on any tag (firehose)
parser.on("tag", console.log)
// all tags are also emitted by name
parser.on("monster", App.redraw)
// tell the parser to parse the incoming tcp packets
lich.pipe(parser)
2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago