open-index/open-npm huggingface dataset:
npm package: @shimaore/jsonparse
Description: This is a pure-js JSON streaming parser for node.js with number reviver
Author: Tim Caswell
Latest version: 1.0.0

This is a streaming JSON parser.  For a simpler, sax-based version see this gist: https://gist.github.com/1821394

The MIT License (MIT)
Copyright (c) 2011-2012 Tim Caswell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @shimaore/punt
Description: tiny / elegant UDP messaging library
Latest version: 1.0.0


# (@shimaore) Punt

  A small layer on top of node's core __UDP__ module to make fast volatile messaging even simpler.
  Punt uses the tiny [AMP](https://github.com/visionmedia/node-amp) prototol to serialize buffer, string,
  and json arguments.

## Installation

```
$ npm install punt
```

## Example

  A small in-proc example of a server with three clients:

```js
var punt = require('punt');
var server = punt.bind('udp4://0.0.0.0:5000');
var a = punt.connect('udp4://0.0.0.0:5000');
var b = punt.connect('udp4://0.0.0.0:5000');
var c = punt.connect('udp4://0.0.0.0:5000');

server.on('message', function(msg){
  console.log(msg);
});

setInterval(function(){
  a.send({ hello: 'world' });
}, 150);

setInterval(function(){
  b.send('hello world');
}, 150);

setInterval(function(){
  c.send(new Buffer('hello'));
}, 150);
```

  yielding:

```
<Buffer 68 65 6c 6c 6f>
hello world
{ hello: 'world' }
<Buffer 68 65 6c 6c 6f>
hello world
{ hello: 'world' }
...
```
## API

### Server(addr)

  Bind to the given `addr`.

### Client(addr)

  Connect to the given `addr`.

### Client#send(...)

  Send one or more arguments a single atomic message. The following
  types are supported through AMP:

  - strings
  - buffers
  - objects (serialized as JSON)

## License

  MIT