open-index/open-npm huggingface dataset:
npm package: @jsxtools/is-equal
Description: Returns whether two values are the same value.
Author: Jonathan Neal
Latest version: 1.0.6

# is-equal [<img src="https://avatars.githubusercontent.com/u/52989093" alt="" width="90" height="90" align="right">][frontend]

[<img alt="npm version" src="https://img.shields.io/npm/v/@jsxtools/is-equal.svg" height="20">](https://www.npmjs.com/package/@jsxtools/is-equal)
[<img alt="build status" src="https://img.shields.io/travis/jsxtools/frontend/master.svg" height="20">](https://travis-ci.org/github/jsxtools/frontend)
[<img alt="issue tracker" src="https://img.shields.io/github/issues/jsxtools/frontend/is-equal.svg" height="20">](https://github.com/jsxtools/frontend/issues?q=is:issue+is:open+label:is-equal)
[<img alt="pull requests" src="https://img.shields.io/github/issues-pr/jsxtools/frontend/is-equal.svg" height="20">](https://github.com/jsxtools/frontend/pulls?q=is:pr+is:open+label:is-equal)

**is-equal** returns whether two values are the same value.

It is <strong size>288 bytes (197 gzipped)</strong>.

## Installation

```sh
npm install @jsxtools/is-equal
```

## Usage

```js
import isEqual from '@jsxtools/is-equal';

// these objects are shallow equal
objectA = { name: 'Adam', age: 930 };
objectB = { name: 'Adam', age: 930 };
isEqual(objectA, objectB);

// these objects are not shallow equal
objectA = { name: 'Adam', age: 930, pets: ['dog'] };
objectB = { name: 'Adam', age: 930, pets: ['dog'] };
isEqual(objectA, objectB);

// but they are deeply equal
isEqual(objectA, objectB, isEqual);
```

[frontend]: https://github.com/jsxtools/frontend
npm package: @jsxtools/is-type
Description: A collection of functions that return whether a value is a certain type.
Author: Jonathan Neal
Latest version: 1.0.8

# is-type [<img src="https://avatars.githubusercontent.com/u/52989093" alt="" width="90" height="90" align="right">][frontend]

[<img alt="npm version" src="https://img.shields.io/npm/v/@jsxtools/is-type.svg" height="20">](https://www.npmjs.com/package/@jsxtools/is-type)
[<img alt="build status" src="https://img.shields.io/travis/jsxtools/frontend/master.svg" height="20">](https://travis-ci.org/github/jsxtools/frontend)
[<img alt="issue tracker" src="https://img.shields.io/github/issues/jsxtools/frontend/is-type.svg" height="20">](https://github.com/jsxtools/frontend/issues?q=is:issue+is:open+label:is-type)
[<img alt="pull requests" src="https://img.shields.io/github/issues-pr/jsxtools/frontend/is-type.svg" height="20">](https://github.com/jsxtools/frontend/pulls?q=is:pr+is:open+label:is-type)

**is-type** is a collection of functions that return whether a value is a certain type.

It is <strong size>280 bytes (173 gzipped)</strong>.

## Installation

```sh
npm install @jsxtools/is-type
```

## Usage

```js
import { isArray, isBoolean, isNumber, isObject, isString } from '@jsxtools/is-type';

isArray(''); // false
isArray([]); // true
isArray({}); // false

isBoolean(false); // true
isBoolean(0); // false
isBoolean(!0); // true

isNumber(0); // true
isNumber(Infinity); // false
isNumber(NaN); // false
isNumber('0'); // false

isObject({}); // true
isObject([]); // true
isObject(''); // false

isString(''); // true
isString([]); // false
isString({}); // false
```

[frontend]: https://github.com/jsxtools/frontend
npm package: @jsxtools/prevent-default
Description: Returns a function that will invoke preventDefault on any events passed into it.
Author: Jonathan Neal
Latest version: 1.0.6

# prevent-default [<img src="https://avatars.githubusercontent.com/u/52989093" alt="" width="90" height="90" align="right">][frontend]

[<img alt="npm version" src="https://img.shields.io/npm/v/@jsxtools/prevent-default.svg" height="20">](https://www.npmjs.com/package/@jsxtools/prevent-default)
[<img alt="build status" src="https://img.shields.io/travis/jsxtools/frontend/master.svg" height="20">](https://travis-ci.org/github/jsxtools/frontend)
[<img alt="issue tracker" src="https://img.shields.io/github/issues/jsxtools/frontend/prevent-default.svg" height="20">](https://github.com/jsxtools/frontend/issues?q=is:issue+is:open+label:prevent-default)
[<img alt="pull requests" src="https://img.shields.io/github/issues-pr/jsxtools/frontend/prevent-default.svg" height="20">](https://github.com/jsxtools/frontend/pulls?q=is:pr+is:open+label:prevent-default)

**prevent-default** returns a function that invokes `preventDefault` on any `event` passed into it.

It is <strong size>191 bytes (145 gzipped)</strong>.

## Installation

```sh
npm install @jsxtools/prevent-default
```

## Usage

```js
import preventDefault from '@jsxtools/prevent-default';

document.querySelector('form').addEventListener('submit', preventDefault(() => {
  // handle submission via JS without submission
}));
```

[frontend]: https://github.com/jsxtools/frontend
npm package: @jsxtools/ref-on
Description: Handle DOM events like React synthetic events.
Author: Jonathan Neal
Latest version: 1.0.5

# ref-on [<img src="https://avatars.githubusercontent.com/u/52989093" alt="" width="90" height="90" align="right">][frontend]

[<img alt="npm version" src="https://img.shields.io/npm/v/@jsxtools/ref-on.svg" height="20">](https://www.npmjs.com/package/@jsxtools/ref-on)
[<img alt="build status" src="https://img.shields.io/travis/jsxtools/frontend/master.svg" height="20">](https://travis-ci.org/github/jsxtools/frontend)
[<img alt="issue tracker" src="https://img.shields.io/github/issues/jsxtools/frontend/ref-on.svg" height="20">](https://github.com/jsxtools/frontend/issues?q=is:issue+is:open+label:ref-on)
[<img alt="pull requests" src="https://img.shields.io/github/issues-pr/jsxtools/frontend/ref-on.svg" height="20">](https://github.com/jsxtools/frontend/pulls?q=is:pr+is:open+label:ref-on)

**ref-on** lets you handle DOM events like React [synthetic events].

It is <strong size>854 bytes (449 gzipped)</strong>.

## Installation

```sh
npm install @jsxtools/ref-on
```

## Usage

```js
import on from '@jsxtools/ref-on';

function FormField() {
  return (
    <p ref={on({
      focusin (event) {
        console.log(event.target); // <input>
      },
      input (event) {
        console.log(event.target.value); // <input>’s value
      }
    })}>
        <label htmlFor="gn">Given Name</label>
        <input id="gn" />
    </p>
  );
}
```

[frontend]: https://github.com/jsxtools/frontend
[synthetic events]: https://reactjs.org/docs/handling-events.html
npm package: @jsxtools/resize-observer
Description: Minimal polyfill for the ResizeObserver API
Author: Jonathan Neal
Latest version: 1.0.4

# resize-observer [<img src="https://avatars.githubusercontent.com/u/52989093" alt="" width="90" height="90" align="right">][frontend]

[<img alt="npm version" src="https://img.shields.io/npm/v/@jsxtools/resize-observer.svg" height="20">](https://www.npmjs.com/package/@jsxtools/resize-observer)
[<img alt="build status" src="https://img.shields.io/travis/jsxtools/frontend/master.svg" height="20">](https://travis-ci.org/github/jsxtools/frontend)
[<img alt="issue tracker" src="https://img.shields.io/github/issues/jsxtools/frontend/resize-observer.svg" height="20">](https://github.com/jsxtools/frontend/issues?q=is:issue+is:open+label:resize-observer)
[<img alt="pull requests" src="https://img.shields.io/github/issues-pr/jsxtools/frontend/resize-observer.svg" height="20">](https://github.com/jsxtools/frontend/pulls?q=is:pr+is:open+label:resize-observer)

**resize-observer** is a minimal polyfill for the ResizeObserver API, following the [Resize Observer Specification].

It is <strong size>1946 bytes (852 gzipped)</strong>.

## Installation

```sh
npm install @jsxtools/resize-observer
```

## Usage

```js
import polyfillResizeObserver from '@jsxtools/resize-observer'

// polyfill ResizeObserver
window.ResizeObserver || polyfillResizeObserver(window)
```

```js
import polyfillResizeObserver from '@jsxtools/resize-observer'

// ponyfill ResizeObserver
const { ResizeObserver, ResizeObserverEntry, DOMRectReadOnly } = polyfillResizeObserver({})
```

## Acknowledgments

The algorithms used to calculate the dimensions of an element follow the excellent [resize-observer] project authored by [Tremayne Christ].
That polyfill is a small, performant, and more complete polyfill that follows the latest draft specification.

[frontend]: https://github.com/jsxtools/frontend
[Resize Observer Specification]: https://www.w3.org/TR/resize-observer/
[resize-observer]: https://github.com/juggle/resize-observer
[Tremayne Christ]: https://www.npmjs.com/~trem