open-index/open-npm huggingface dataset:
npm package: @pirxpilot/autosuggest
Description: Autosuggest values for text inputs
Latest version: 1.0.1


# autosuggest

### Autosuggest values for text inputs

`<input type="text">` autosuggest component. [Try the demo][demo]!

Inspired from http://oak.cs.ucla.edu/cs144/projects/javascript/suggest1.html.

## Installation

```bash
$ component install component/autosuggest
```

## Example

```js
var autosuggest = require('autosuggest');
var input = document.querySelector('input[type="text"]');

// array of suggestions
var suggestions = [
  'Sunday',
  'Monday',
  'Tuesday',
  'Wednesday',
  'Thursday',
  'Friday',
  'Saturday'
];

// create an `autosuggest` instance
var suggest = autosuggest(input, suggestions);

// and you can change the array of suggestions to use if they get change
var newSuggestions = suggestions.concat([ 'Funday' ]);
suggest.set(newSuggestions);
```

## API

### autosuggest(el, [suggestions]) → Autosuggest

Returns an `Autosuggest` instance. The instance has `.start()` called on it if the
optional `suggestions` array is given, otherwise you must call `.set(array)` and
`.start()` manually.

### .set(array)

Sets a new array of Strings to use as the suggestions for the `Autosuggest`
instance.

#### .start()

Starts the autosuggesting for the `Autosuggest` instance.

#### .stop()

Stops the autosuggesting for the `Autosuggest` instance..

## License

  MIT

[demo]: http://component.github.com/autosuggest/
npm package: @pirxpilot/bumpy
Description: Bump version numbers in your .json files
Author: Stephen Mathieson
Latest version: 2.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# bumpy

  Bump version numbers in your `.json` files.  Sorry for the stupid name.

## Installation

    $ npm install @pirxpilot/bumpy -g

## Usage

  Type `bumpy {release}`, where `{release}` is either `{major}`, `{minor}`, `{patch}`, or a valid version number.  It'll do what you expect it to.

## Another one of these -- seriousy?

  Yep.  I wanted something more configureable than *insert name here*.

## But I want to bump versions for *insert package manager here* too!

  Just add/edit your `~/.bumpyrc` file like so:

```js
{
  "files": [
    "whatever.json",
    "package.json",
    "component.json",
    "bower.json"
  ]
}
```

  FYI - this can be ignored with an `-i|--ignore` flag.

## License 

(The MIT License)

Copyright (c) 2013 Stephen Mathieson &lt;me@stephenmathieson.com&gt;

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-image]: https://img.shields.io/npm/v/@pirxpilot/bumpy
[npm-url]: https://npmjs.org/package/@pirxpilot/bumpy

[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/bumpy/check.yaml?branch=main
[build-url]: https://github.com/pirxpilot/bumpy/actions/workflows/check.yaml

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/bumpy
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fbumpy
npm package: @pirxpilot/calendar
Description: Calendar component
Latest version: 3.0.1

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# Calendar

  Calendar UI component designed for use as a date-picker,
  full-sized calendar or anything in-between.

  Live demo is [here](https://pirxpilot.github.io/calendar/)

## Installation

    $ npm install --save @pirxpilot/calendar

## Example

```js
var Calendar = require('@pirxpilot/calendar');
var cal = new Calendar;
cal.el.appendTo('body');
```

## Events

  - `view change` (date, action) when the viewed month/year is changed without modification of the selected date. This can be done either by next/prev buttons or dropdown menu. The action will be "prev", "next", "month" or "year" depending on what action caused the view to change.
  - `change` (date) when the selected date is modified

## API

### new Calendar(date)

  Initialize a new `Calendar` with the given `date` shown,
  defaulting to now.

### Calendar#select(date)

  Select the given `date` (`Date` object).

### Calendar#show(date)

  Show the given `date`. This does _not_ select the given date,
  it simply ensures that it is visible in the current view.

### Calendar#showMonthSelect()

  Add month selection input.

### Calendar#showYearSelect([from], [to])

  Add year selection input, with optional range specified by `from` and `to`,
  which default to the current year -10 / +10.

### Calendar#prev()

  Show the previous view (month).

### Calendar#next()

  Show the next view (month).

### Calendar#min()

  Define earliest valid date - calendar won't generate `change` events for dates before this one.

### Calendar#max()

  Define latest valid date - calendar won't generate `change` events for dates after this one.

### Calendar#locale(locales)

  Set alternative locale:
  - `locales` - Optional. A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the locales argument, see the [Intl] page.

  For [browsers][caniuse-intl] which do not support `Intl` in not available only English locale is supported.

## Themes

  [Aurora](https://github.com/component/aurora-calendar):

  ![](http://f.cl.ly/items/043N1r0e1L130y162R2f/Screen%20Shot%202012-09-17%20at%209.17.32%20PM.png)

# License

  MIT

[Intl]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation
[caniuse-intl]: http://caniuse.com/#search=Intl

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/calendar
[npm-url]: https://npmjs.org/package/@pirxpilot/calendar

[build-url]: https://github.com/pirxpilot/calendar/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/calendar/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/calendar
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fcalendar
npm package: @pirxpilot/choo
Description: A 4kb framework for creating sturdy frontend applications
Latest version: 2.0.1

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# @pirxpilot/choo

Fork of [choo] only even smaller.

## Major changes

- removed built-in support for `nanocomponent`
- removed build-in support for `nanohtml`
- modern javascript syntax

## License

MIT © [Yoshua Wuyts](https://twitter.com/yoshuawuyts)  
MIT © [Damian Krzeminski](https://pirxpilot.me)

[choo]: https://npmjs.org/package/choo

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/choo
[npm-url]: https://npmjs.org/package/@pirxpilot/choo

[build-url]: https://github.com/pirxpilot/choo/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/choo/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/choo
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fchoo
npm package: @pirxpilot/choo-hooks
Description: Hook into Choo's events and timings
Latest version: 1.0.1

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# choo-hooks

Fork of [choo-hooks].
Hook into Choo's events and timings. Useful to create loggers, analytics and
more.

## Usage
```js
var Hooks = require('choo-hooks')
var choo = require('choo')

var app = choo()
app.use(function (state, emitter) {
  var hooks = Hooks(emitter)
  hooks.on('event', function (eventName, timing, data) {
    console.log(eventName + ':', timing.duration + 'ms', data)
  })

  hooks.on('unhandled', function (eventName, data) {
    console.error('No listeners for ' + eventName)
  })
})
```

## API
### hooks = Hooks(emitter)
Create a new Choo Hooks instance.

### `hook.on('log:trace', cb(…args))`
### `hook.on('log:debug', cb(…args))`
### `hook.on('log:info', cb(…args))`
### `hook.on('log:warn', cb(…args))`
### `hook.on('log:error', cb(…args))`
### `hook.on('log:fatal', cb(…args))`
Listen for log events.

### `hook.on('service-worker', cb(data))`
Listen for service worker event.

### `hook.on('event', cb(eventName, timing, data))`
Called for events implemented at the application layer.

### `hook.on('unhandled', cb(eventName, data))`
Called whenever an event is emitted, and there is no handler available.

### `hook.on('DOMContentLoaded', cb(timing))`
Called whenever the DOM has loaded. Returns the `window.performance.timing`
object.

### `hook.on('render', cb(timings))`
Called whenever Choo renders. Returns an object with the `render` and `morph`
properties.

### `hook.on('resourceTimingBufferFull', cb())`
Called whenever the browser's resource timing buffer has filled up.

## License
[MIT](https://tldrlegal.com/license/mit-license)


[choo-hooks]: https://npmjs.org/package/choo-hooks

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/choo-hooks
[npm-url]: https://npmjs.org/package/@pirxpilot/choo-hooks

[build-url]: https://github.com/pirxpilot/choo-hooks/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/workflow/status/pirxpilot/choo-hooks/check

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/choo-hooks
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fchoo-hooks
npm package: @pirxpilot/confirmation
Description: Confirmation component
Latest version: 4.0.1


# Confirmation

  Confirmation component with structural styling to give you a clean slate. Built on
  the [Dialog](http://github.com/component/dialog) component.

  ![js confirmation component](http://f.cl.ly/items/142j0B0d1E2K3z0r3h0i/Screen%20Shot%202012-08-03%20at%2011.37.49%20AM.png)
  ![confirm](http://f.cl.ly/items/0o0z3T2R0o1v3S1E3d2W/Screen%20Shot%202012-08-03%20at%2011.37.57%20AM.png)

  Live demo is [here](http://component.github.io/confirmation/)

## Installation

```
$ npm install @pirxpilot/confirmation
```

## Features

  - events for composition
  - structural CSS letting you decide on style
  - overlay, modal, escapable etc from Dialog
  - fluent API

## Events

  - `show` the confirmation is shown
  - `hide` the confirmation is hidden
  - `cancel` the user closed the confirmation or cancelled
  - `ok` the user accepted

## API
  
### confirm(msg)

  Display a confirmation dialog with a `msg` only.

### confirm(title, msg)

  Display a confirmation dialog with `title` and `msg`.

### Confirmation#focus(type)

  By default the "cancel" button is focused, however you
  may invoke `.focus('ok')`.

### Confirmation#cancel(text)

  Set cancel button `text`.

### Confirmation#ok(text)

  Set cancel ok `text`.

### Confirmation#show([fn])

  Show the confirmation and invoke `fn` with
  a boolean representing the user's choice.

  View the [Dialog](http://github.com/component/dialog) API for
  additional methods such as `.modal()`, `.closable()` etc.

## License

  MIT
npm package: @pirxpilot/confirmation-popover
Description: Popover component with OK/Cancel buttons
Latest version: 3.0.1

# Confirmation Popover

  Popover confirmation component built on top of [Popover](https://github.com/pirxpilot/popover).

  Live demo is [here](https://pirxpilot.github.io/confirmation-popover/).

## Installation

  Install with [npm]:

    $ npm install @pirxpilot/confirmation-popover

## Features

  - all the features of Popover / Tip

## Events

  - `show` the confirmation is shown
  - `hide` the confirmation is hidden
  - `cancel` the user closed the confirmation or cancelled
  - `ok` the user accepted

## API

### new ConfirmationPopover(msg, [title])

  Create a new popover with `msg` and optional `title`.

```js
var Confirmation = require('confirmation-popover');
var confirm = new Confirmation('This action cannot be undone.', 'Delete tobi?');
confirm.show(el);
```

### .focus(type)

  By default the "cancel" button is focused, however you
  may invoke `.focus('ok')`.

### .cancel(text)

  Set cancel button `text`.

### .ok(text)

  Set cancel ok `text`.

### .show(el, [fn])

  Attach to `el`, and invoke `fn` with
  a boolean representing the user's choice.

  When `fn` is omitted you may still utilize the `cancel` / `ok` events.

### ...

  View [Tip](https://github.com/pirxpilot/tip) and [Popover](https://github.com/pirxpilot/popover) for additional
  API documentation.

## License

  MIT

[npm]: https://www.npmjs.org/
npm package: @pirxpilot/connect-session
Description: Simple session middleware for Connect/Express
Author: TJ Holowaychuk
Latest version: 4.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# @pirxpilot/connect-session

This is a fork of the [express-session] with the following changes:
- modernized for node >= 20
- relaxed dependencies
- cookies parser midlleware (such as [cookie-parser] and `res.cookie` implementation compatible with what [Express][express] provides is required to use this module

## License

[MIT](LICENSE)

[cookie-parser]: https://npmjs.org/package/cookie-parser
[express]: https://npmjs.org/package/express
[express-session]: https://npmjs.org/package/express-session

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/connect-session
[npm-url]: https://npmjs.org/package/@pirxpilot/connect-session

[build-url]: https://github.com/pirxpilot/connect-session/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/connect-session/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/connect-session
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fconnect-session
npm package: @pirxpilot/cookie-parser
Description: Parse HTTP request cookies
Author: TJ Holowaychuk
Latest version: 3.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# @pirxpilot/cookie-parser

This is a fork of the [cookie-parser] with the following changes:
- modernized for node >= 20
- relaxed dependencies

## License

[MIT](LICENSE)

[cookie-parser]: https://npmjs.org/package/cookie-parser

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/cookie-parser
[npm-url]: https://npmjs.org/package/@pirxpilot/cookie-parser

[build-url]: https://github.com/pirxpilot/cookie-parser/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/cookie-parser/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/cookie-parser
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fcookie-parser
npm package: @pirxpilot/css
Description: Simple CSS manipulation.
Author: Ian Storm Taylor
Latest version: 2.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# css
  
  Simple CSS manipulation.

## Installation

    $ npm install @pirxpilot/css

## Example

```js
var css = require('css');
var div = document.getElementById('header');

// get
css(div, 'position'); // "relative"

// set one at a time
css(div, 'position', 'fixed');

// set many at a time
css(div, {
  position: 'fixed',
  top: '24px'
});

// use dashes if you want
css(div, 'font-size', '16px');

// you can omit "px" and it will be added automatically
css(div, 'font-size', 16);
```

## API

### css(el, property)
  
  Get the current value of a CSS `property` of an `el`.

### css(el, property, value)

  Set the `value` of a CSS `property` on an `el`.

### css(el, properties)

  Set the value of a dictionary of `properties` on an `el`.

## License

  MIT

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/css
[npm-url]: https://npmjs.org/package/@pirxpilot/css

[build-url]: https://github.com/pirxpilot/css/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/css/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/css
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fcss
npm package: @pirxpilot/csv-parse
Description: Minimal CSV parser implemented using web `TransformStream`
Author: Damian Krzeminski
Latest version: 1.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# @pirxpilot/csv-parse

Minimal CSV parser implemented using web `TransformStream`

## Install

```sh
$ npm install --save @pirxpilot/csv-parse
```

## Usage

```js
const res = await fetch('http://example.com/cities.csv');
const stream = res.body
  .pipeThrough(new TextDecoderStream())
  .pipeThrough(new CsvLineStream({ trim: true }));

for await (const line of stream) {
  console.log('Line: %s', line);
}
```

## License

MIT © [Damian Krzeminski](https://pirxpilot.me)

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/csv-parse
[npm-url]: https://npmjs.org/package/@pirxpilot/csv-parse

[build-url]: https://github.com/pirxpilot/csv-parse/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/csv-parse/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/csv-parse
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fcsv-parse
npm package: @pirxpilot/datepicker
Description: Datepicker ui component built on component/calendar
Latest version: 3.0.1

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]

# datepicker

  Date picker ui component built on component/calendar.
  
## Installation

    $ npm install --save @pirxpilot/datepicker

## License

  MIT

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/datepicker
[npm-url]: https://npmjs.org/package/@pirxpilot/datepicker

[build-url]: https://github.com/pirxpilot/datepicker/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/datepicker/check.yaml?branch=main
npm package: @pirxpilot/delegate
Description: Bare-bones DOM event delegation.
Author: Damian Krzeminski
Latest version: 3.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# delegate

Bare-bones DOM event delegation for modern browsers.

## Install

```sh
$ npm install --save @pirxpilot/delegate
```

## Usage

```js
import delegate from '@pirxpilot/delegate';

// call `onOk` when '.ok` in buttons is clicked
const handler = delegate.bind(buttons, '.ok', 'click', onOk);

// remove onOk handler
delegate.unbind(buttons, 'click', handler);

```

## License

MIT © [Damian Krzeminski](https://pirxpilot.me)

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/delegate
[npm-url]: https://npmjs.org/package/@pirxpilot/delegate

[build-url]: https://github.com/pirxpilot/delegate/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/delegate/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/delegate
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fdelegate
npm package: @pirxpilot/dialog
Description: Dialog component
Latest version: 4.0.1

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# Dialog

  Dialog component with structural styling to give you a clean slate.

  Live demo is [here](http://pirxpilot.github.io/dialog/)

## Installation

```
$ npm install @pirxpilot/dialog
```

## Features

  - events for composition
  - structural CSS letting you decide on style
  - overlay support
  - modal overlay support
  - escapable (esc key support)
  - fluent API

## Events

  - `show` the dialog is shown
  - `hide` the dialog is hidden
  - `escape` the dialog was closed via the escape key
  - `close` the dialog was closed via the close button

## API

### dialog(msg)

  Display a dialog with a `msg` only.

### dialog(title, msg)

  Display a dialog with `title` and `msg`.

### Dialog#closable()

  Make the dialog closable, this adds a ×
  that users make click to forcefully close
  the dialog.

### Dialog#effect(name)

  Assign the effect name, driven by CSS transitions.
  Out of the box the following are available:

  - `slide`
  - `fade`
  - `scale`

### Dialog#overlay()

  Add a clickable overlay, which closes the dialog.

### Dialog#modal()

  Add a non-clickable overlay making it modal.

### Dialog#fixed()

  Dialogs are centered by default. If you'd rather use CSS to position the dialog make it `fixed`;
  no per element CSS properties are added to such dialogs.

### Dialog#escapable()

  This is __private__ as it is implied by other options.
  If no overlay is used, or the overlay is non-modal
  then a user may close the dialog by pressing the escape key.

### Dialog#show()

  Show the dialog.

### Dialog#hide([ms])

  Hide the dialog immediately or wait `ms`.

### Dialog#addClass(name)

  Add class `name`, useful for styling dialogs differently.

## License

  MIT

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/dialog
[npm-url]: https://npmjs.org/package/@pirxpilot/dialog

[build-url]: https://github.com/pirxpilot/dialog/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/dialog/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/dialog
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fdialog
npm package: @pirxpilot/events
Description: Simple dom event management.
Author: Damian Krzeminski
Latest version: 3.0.0

[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# events

Bare-bones dom event management. Heavily inspired by [component/events].
Use when multiple event listeners are naturally part of the same object.

## Install

```sh
$ npm install --save @pirxpilot/events
```

## Usage

```js
var events = require('@pirxpilot/events');
var el = document.querySelector('button.ok');
var handlers = {
  click: function() {
    // do something on click
  },
  onblur: function() {
    // do something on blur
  }
};

var e = events(el, obj);
e.bind('click');

// add handlers
e.bind('mouseenter');
e.bind('blur', 'onblur');

e.unbind();
```

## API

### events(el, obj)

create events for dom element `el` and handlers object `obj`

### bind(event, [method])

add event listener and bind it to `obj` - if `method` is not specified use method that has the same name as event ie. use `mouseup` method for `mouseup` event

### Events.unbind([event])

remove event listener for specific `event`, if `event` is not specified remove all registered listeners

## License

MIT © [Damian Krzeminski](https://pirxpilot.me)

[npm-image]: https://img.shields.io/npm/v/@pirxpilot/events
[npm-url]: https://npmjs.org/package/@pirxpilot/events

[build-url]: https://github.com/pirxpilot/events/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/events/check.yaml?branch=main

[deps-image]: https://img.shields.io/librariesio/release/npm/@pirxpilot/events
[deps-url]: https://libraries.io/npm/@pirxpilot%2Fevents

[component/events]: https://github.com/component/events
npm package: @pirxpilot/eventsource-polyfill
Description: A browser polyfill for W3C EventSource (http://www.w3.org/TR/eventsource/)
Author: amvtek
Latest version: 1.0.1

EventSource Polyfill
====================

Provide polyfill to support EventSource in browser where it is not available.

> -   Used in production
> -   Tested in Internet Explorer 8 +
> -   Tested in Android browser 2.1 +
> -   [Documented][]
> -   Run the [Browser test suite][]

Installing
----------

### from source

Download suitable project archive (zip or tar.gz) from [release page][]

Include in your html documents one of the following javascript file:

> -   *dist/eventsource.js*
> -   *dist/eventsource.min.js* (minified version)

### Using bower package manager

To install package from **bower registry**, type :

    bower install eventsource-polyfill

Include in your html documents one of the following javascript file:

> -   *bower\_components/eventsource-polyfill/dist/eventsource.js*
> -   *bower\_components/eventsource-polyfill/dist/eventsource.min.js* (minified version)

### Using npm package manager

To install package from **npm registry**, type :

    npm install eventsource-polyfill

Note that this package may only be used with in **browser application**.

If you are using [browserify][] , you just have to require this package in your main module…

``` sourceCode
// load (Polyfill) EventSource, in case browser does not support it...
require('eventsource-polyfill');
```

Run the tests now
-----------------

With your web browser visit this [test site][Browser test suite]

Allow **sufficient time** ( ~ 5 minutes) for the full Test Suite to run…

Project content
---------------

dist/  
    built version of javascript modules

javascript/  
    Contains polyfill module and related unit tests

test_server/  
    python server which generates *easy to test* **event stream**

docs/  
    documentation wiki

  [Documented]: https://github.com/amvtek/EventSource/wiki
  [Browser test suite]: http://testevs.amvtek.com/
  [release page]: https://github.com/amvtek/EventSource/releases/latest
  [browserify]: http://browserify.org