open-index/open-npm huggingface dataset:
npm package: @primitiva/kernel
Description: A lightweight React kernal library
Author: Lovelidge, Shawn
Latest version: 1.0.1


### @primitiva/kernel
This React kernal library is a foundational library used for core functionality used within a React applications. It provides essential utilities and functions, and constants that are commonly used in React projects.

#### Installation

To install the @primitiva/kernel Library, you can use npm or yarn:

```bash
npm install @primitiva/kernel@lastest
```

or

```bash
yarn add @primitiva/kernel@lastest
```

#### Usage

Here is an example of how to use the React Core Library in your project:

```javascript
import { Base } from '@primitiva/kernel';

function App() {
  const base = new Base();

  return (
    <>
    </>
  );
}

export default App;
```

#### Running Tests

To execute the test scripts, you can use the following command:

```bash
npm test
```

or

```bash
yarn test
```

This will run the test suite and provide you with feedback on the functionality of the library.

#### Linting

To ensure that your code adheres to the project's coding standards, you can run the linter with the following command:

```bash
npm run lint
```

or

```bash
yarn lint
```

This will check your code for any linting errors and help you maintain a consistent codebase.
npm package: @primitiva/react
Description: A lightweight React kernal library
Author: Lovelidge, Shawn
Latest version: 1.0.0


### @primitiva/kernel
This React kernal library is a foundational library used for core functionality used within a React applications. It provides essential utilities and functions, and constants that are commonly used in React projects.

#### Installation

To install the @primitiva/kernel Library, you can use npm or yarn:

```bash
npm install @primitiva/kernel@lastest
```

or

```bash
yarn add @primitiva/kernel@lastest
```

#### Usage

Here is an example of how to use the React Core Library in your project:

```javascript
import { Base } from '@primitiva/kernel';

function App() {
  const base = new Base();

  return (
    <>
    </>
  );
}

export default App;
```

#### Running Tests

To execute the test scripts, you can use the following command:

```bash
npm test
```

or

```bash
yarn test
```

This will run the test suite and provide you with feedback on the functionality of the library.

#### Linting

To ensure that your code adheres to the project's coding standards, you can run the linter with the following command:

```bash
npm run lint
```

or

```bash
yarn lint
```

This will check your code for any linting errors and help you maintain a consistent codebase.
npm package: @primitive-react/accordion
Description: Create your own React component.
Author: Tania Rascia
Latest version: 0.1.0

# Primitive React Accordion

Create your own React component.

```bash
npm i # or install all the dependencies manually to get the latest versions
npm i --save-dev @babel/core @babel/plugin-proposal-class-properties @babel/preset-env @babel/preset-react babel-loader react webpack webpack-cli
npm run build
```

### Publish to npm

```
npm publish --access=public
```
npm package: @primitive/is-boolean
Description: Determine if a value is a boolean
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-boolean.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-boolean/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-boolean.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-boolean.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-boolean
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-boolean/dist/index.min.js

# is-boolean

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is a boolean.

A value is a boolean if it is of primitive type `boolean`, or is an instance of
reference type `Boolean`.

## Usage

```shell
    npm install @primitive/is-boolean --save   # Install package via NPM
    yarn add @primitive/is-boolean             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isBoolean from "@primitive/is-boolean";

    expect(isBoolean(true)).to.be.true;
    expect(isBoolean(false)).to.be.true;
    expect(isBoolean(new Boolean(true))).to.be.true;

    expect(isBoolean(undefined)).to.be.false;
    expect(isBoolean(null)).to.be.false;
    expect(isBoolean("true").to.be.false;
    expect(isBoolean(1)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isBoolean(x)) {
        // IntelliSense now knows `x` is a boolean.
        let y: boolean = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-boolean/dist/index.min.js">
    <script type="application/javascript">
        var x = true;
        if (isBoolean(x)) {
            // `x` is a boolean!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-finite
Description: Determine if a value is a finite `number`
Author: George Thomas
Latest version: 1.0.0

# is-finite

Determine whether a JavaScript value is a finite `number`.

## Usage

```js
    import { expect } from "chai";
    import isFinite from "@primitive/is-finite";

    expect(isFinite(42)).to.be.true;
    expect(isFinite(Number("1000"))).to.be.true;

    expect(isFinite(undefined)).to.be.false;
    expect(isFinite(null)).to.be.false;
    expect(isFinite(Number.POSITIVE_INFINITY)).to.be.false;
    expect(isFinite(Number.NEGATIVE_INFINITY)).to.be.false;
    expect(isFinite(1 / 0))to.be.false;
    expect(isFinite(0 / 0)).to.be.false;
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for build automation, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

See the `LICENSE` file for license information.
npm package: @primitive/is-function
Description: Determine if a value is a function
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-function.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-function/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-function.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-function.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-function
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-function/dist/index.min.js

# is-function

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is a function.

A value is a function if it is a literal `function`, or is an instance of type
`Function`.

## Usage

```shell
    npm install @primitive/is-function --save   # Install package via NPM
    yarn add @primitive/is-function             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isFunction from "@primitive/is-function";

    expect(isFunction(function () {})).to.be.true;
    expect(isFunction(() => {})).to.be.true;
    expect(isFunction(new Function())).to.be.true;

    expect(isFunction(undefined)).to.be.false;
    expect(isFunction(null)).to.be.false;
    expect(isFunction(42).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isFunction(x)) {
        // IntelliSense now knows `x` is a function.
        let y: Function = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-function/dist/index.min.js">
    <script type="application/javascript">
        if (isFunction(console.log)) {
            // `console.log` is a function!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-nan
Description: Determine if a value is `NaN`
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-nan.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-nan/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-nan.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-nan.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-nan
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-nan/dist/index.min.js

# is-nan

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is `NaN`.

## Usage

```shell
    npm install @primitive/is-nan --save   # Install package via NPM
    yarn add @primitive/is-nan             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isNaN from "@primitive/is-nan";

    expect(isNaN(Math.sqrt(-1))).to.be.true;
    expect(isNaN(0 / 0)).to.be.true;
    expect(isNaN(NaN)).to.be.true;

    expect(isNaN(undefined)).to.be.false;
    expect(isNaN(null)).to.be.false;
    expect(isNaN(42).to.be.false;
```

This package contains TypeScript type declarations.

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-nan/dist/index.min.js">
    <script type="application/javascript">
        var x = 0 / 0;
        if (isNaN(x)) {
            // `x` is `NaN`!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-null
Description: Determine if a value is `null`
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-null.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-null/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-null.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-null.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-null
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-null/dist/index.min.js

# is-null

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is `null`.

## Usage

```shell
    npm install @primitive/is-null --save   # Install package via NPM
    yarn add @primitive/is-null             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isNull from "@primitive/is-null";

    expect(isNull(null)).to.be.true;

    expect(isNull(undefined)).to.be.false;
    expect(isNull(42)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isNull(x)) {
        // IntelliSense now knows `x` is `null`.
        let y: null = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-null/dist/index.min.js">
    <script type="application/javascript">
        var x = null;
        if (isNull(x)) {
            // `x` is `null`!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-number
Description: Determine if a value is a number
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-number.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-number/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-number.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-number.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-number

# is-number

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is a number.

A value is a number if it is of primitive type `number`, or is an instance of
reference type `Number`.

## Usage

```shell
    npm install @primitive/is-number --save   # Install package via NPM
    yarn add @primitive/is-number             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isNumber from "@primitive/is-number";

    expect(isNumber(42)).to.be.true;
    expect(isNumber(0))to.be.true;
    expect(isNumber(new Number(1000))).to.be.true;

    expect(isNumber(undefined)).to.be.false;
    expect(isNumber(null)).to.be.false;
    expect(isNumber("42").to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isNumber(x)) {
        // IntelliSense now knows `x` is a number.
        let y: number = x;
    }
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-object
Description: Determine if a value is an object
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-object.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-object/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-object.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-object.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-object
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-object/dist/index.min.js

# is-object

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is an object.

A value is an object if it is of type `object`, or is an instance of reference
type `Object`.

## Usage

```shell
    npm install @primitive/is-object --save   # Install package via NPM
    yarn add @primitive/is-object             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isObject from "@primitive/is-object";

    expect(isObject(new Object())).to.be.true;
    expect(isObject({ foo: true })).to.be.true;

    expect(isObject([ 1, 2, 3 ]).to.be.false;
    expect(isObject(undefined)).to.be.false;
    expect(isObject(null)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isObject(x)) {
        // IntelliSense now knows `x` is an object.
        let y: object = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-object/dist/index.min.js">
    <script type="application/javascript">
        var x = { foo: "bar", baz: "ray" };
        if (isObject(x)) {
            // `x` is an object!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-primitive
Description: Determine if a value is primitive
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-primitive.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-primitive/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-primitive.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-primitive.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-primitive
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-primitive/dist/index.min.js

# is-primitive

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is primitive.

A value is primitive if it is of a primitive type.

## Usage

```shell
    npm install @primitive/is-primitive --save   # Install package via NPM
    yarn add @primitive/is-primitive             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isPrimitive from "@primitive/is-primitive";

    expect(isPrimitive("Boo")).to.be.true;
    expect(isPrimitive(42)).to.be.true;
    expect(isPrimitive(new Symbol("boo"))).to.be.true;
    expect(isPrimitive(isPrimitive)).to.be.true;
    expect(isPrimitive(undefined)).to.be.true;
    expect(isPrimitive(null)).to.be.true;
    expect(isPrimitive(true)).to.be.true;

    expect(isPrimitive({ foo: "bar" })).to.be.false;
    expect(isPrimitive(new String("boo"))).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isPrimitive(x)) {
        // IntelliSense now knows `x` is a primitive value.
        let y: Primitive = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-primitive/dist/index.min.js">
    <script type="application/javascript">
        var x = 42;
        if (isPrimitive(x)) {
            // `x` is of a primitive type!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-reference
Description: Determine if a value is an instance of a reference type
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-reference.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-reference/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-reference.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-reference.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-reference
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-reference/dist/index.min.js

# is-reference

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is an instance of a primitive reference type.

A value is a reference if it is an instance of a primitive reference type, such
as `String`, `Number`, and `Boolean`.

## Usage

```shell
    npm install @primitive/is-reference --save   # Install package via NPM
    yarn add @primitive/is-reference             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isReference from "@primitive/is-reference";

    expect(isReference(new Boolean(true))).to.be.false;
    expect(isReference(new String("boo"))).to.be.false;
    expect(isReference(new Number(42))).to.be.false;

    expect(isReference(isReference)).to.be.false;
    expect(isReference(undefined)).to.be.false;
    expect(isReference(null)).to.be.false;
    expect(isReference("boo")).to.be.false;
    expect(isReference(true)).to.be.false;
    expect(isReference(42)).to.be.false;
    expect(isReference(new Symbol("boo"))).to.be.false;
    expect(isReference({ foo: "bar" })).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isReference(x)) {
        // IntelliSense now knows `x` is a reference value.
        let y: Reference = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-reference/dist/index.min.js">
    <script type="application/javascript">
        var x = new Number(42);
        if (isReference(x)) {
            // `x` is of a reference type!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-string
Description: Determine if a value is a string
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-string.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-string/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-string.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-string.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-string
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-string/dist/index.min.js

# is-string

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is a string.

A value is a string if it is of primitive type `string`, or is an instance of
reference type `String`.

## Usage

```shell
    npm install @primitive/is-string --save   # Install package via NPM
    yarn add @primitive/is-string             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isString from "@primitive/is-string";

    expect(isString("Boo")).to.be.true;
    expect(isString("")).to.be.true;
    expect(isString(new String("Boo"))).to.be.true;

    expect(isString(undefined)).to.be.false;
    expect(isString(null)).to.be.false;
    expect(isString(42)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isString(x)) {
        // IntelliSense now knows `x` is a string.
        let y: string = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-string/dist/index.min.js">
    <script type="application/javascript">
        var x = "foo";
        if (isString(x)) {
            // `x` is a string!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-symbol
Description: Determine if a value is a symbol
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-symbol.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-symbol/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-symbol.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-symbol.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-symbol
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-symbol/dist/index.min.js

# is-symbol

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is a symbol.

## Usage

```shell
    npm install @primitive/is-symbol --save   # Install package via NPM
    yarn add @primitive/is-symbol             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isSymbol from "@primitive/is-symbol";

    expect(isSymbol(Symbol("Boo"))).to.be.true;
    expect(isSymbol(Symbol())).to.be.true;

    expect(isSymbol(undefined)).to.be.false;
    expect(isSymbol(null)).to.be.false;
    expect(isSymbol(42)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isSymbol(x)) {
        // IntelliSense now knows `x` is a symbol.
        let y: symbol = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-symbol/dist/index.min.js">
    <script type="application/javascript">
        var x = Symbol("foo");
        if (isSymbol(x)) {
            // `x` is a symbol!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-undefined
Description: Determine if a value is `undefined`
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-undefined.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-undefined/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-undefined.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-undefined.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-undefined
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-undefined/dist/index.min.js

# is-undefined

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is `undefined`.

## Usage

```shell
    npm install @primitive/is-undefined --save   # Install package via NPM
    yarn add @primitive/is-undefined             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isUndefined from "@primitive/is-undefined";

    expect(isUndefined(({ x: 42 }).y)).to.be.true;
    expect(isUndefined(undefined)).to.be.true;
    expect(isUndefined(void 0)).to.be.true;

    expect(isUndefined(null)).to.be.false;
    expect(isUndefined(42)).to.be.false;
```

This package contains TypeScript type declarations. Furthermore, the package
uses TypeScript type guards to allow type inference to influence intellisense.

```typescript
    if (isUndefined(x)) {
        // IntelliSense now knows `x` is `undefined`.
        let y: undefined = x;
    }
```

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-undefined/dist/index.min.js">
    <script type="application/javascript">
        var x = undefined;
        if (isUndefined(x)) {
            // `x` is `undefined`!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitive/is-value
Description: Determine if a value is not `undefined` or `null`
Author: George Thomas
Latest version: 1.1.0

[license-shield-url]: https://img.shields.io/github/license/primitive-js/is-value.svg?style=flat-square
[license-url]: https://github.com/Primitive-JS/is-value/blob/master/LICENSE
[npm-downloads-shield-url]: https://img.shields.io/npm/dt/@primitive/is-value.svg?style=flat-square
[npm-version-shield-url]: https://img.shields.io/npm/v/@primitive/is-value.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@primitive/is-value
[unpkg-shield-url]: https://img.shields.io/badge/unpkg-up--to--date-brightgreen.svg?style=flat-square
[unpkg-url]: https://unpkg.com/@primitive/is-value/dist/index.min.js

# is-value

[![NPM][npm-version-shield-url]][npm-url]
[![NPM][npm-downloads-shield-url]][npm-url]
[![CDN][unpkg-shield-url]][unpkg-url]
[![LICENSE][license-shield-url]][license-url]

Determine if a value is not `undefined` or `null`.

## Usage

```shell
    npm install @primitive/is-value --save   # Install package via NPM
    yarn add @primitive/is-value             # Install package via Yarn
```

```javascript
    import { expect } from "chai";
    import isValue from "@primitive/is-value";

    expect(isValue(({ x: 42 }).y)).to.be.true;
    expect(isValue(false)).to.be.true;
    expect(isValue(42)).to.be.true;

    expect(isValue(undefined)).to.be.false;
    expect(isValue(null)).to.be.false;
```

This package contains TypeScript type declarations.

### Content Delivery Network (CDN)

This package can be imported via [unpkg](https://unpkg.com/#/) as demonstrated
below.

```html
    <script src="https://unpkg.com/@primitive/is-value/dist/index.min.js">
    <script type="application/javascript">
        var x = "foo";
        if (isValue(x)) {
            // `x` is not null or undefined!
        }
    </script>
```

## Build & Test

This package uses [Gulp](https://gulpjs.com/) for building, and [Chai](http://chaijs.com/)
and [Mocha](https://mochajs.org/) for testing.

```shell
    npm install     # Installs dependencies.
    npm run build   # Build the project.
    npm test        # Run tests.
```

## License

Refer to the `LICENSE` file for license information.
npm package: @primitivefi/contracts
Description: Primitive options protocol contracts.
Author: Primitive
Latest version: 0.6.0

![](https://raw.githubusercontent.com/primitivefinance/primitive-frontend/develop/src/icons/primitivebannersvg.svg)

# Primitive Protocol

[![](https://img.shields.io/github/stars/primitivefinance/primitive-v1?style=social)](https://img.shields.io/github/stars/primitivefinance/primitive-contracts?style=social)
![Twitter Follow](https://img.shields.io/twitter/follow/primitivefi?style=social)
[![Discord](https://img.shields.io/discord/168831573876015105.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/rzRwJ4K)

# Documentation

The database of Primitive protocol contracts and documentation is hosted on notion here: [Primitive Protocol HQ](https://www.notion.so/primitivefi/Primitive-Protocol-HQ-fc081b939bb04e2a90ccaebf36faa78e)

## Contracts

Primitive is a decentralized protocol for options that is focused on security and simplicity. Users and developers will tap into the protocol to offer and underwrite tokenized options on any ERC-20 token. The protocol operates without any centralized control, enabling an immutable set of smart contracts to work in perpetuity on Ethereum.

This repository has the core contracts for the Option primitives.

The live contract addresses are [here](https://www.notion.so/primitivefi/dc3b883ff9d94044b6738701b2826f7a?v=9e56507d430d4f4fb1939242cfb23736).

We use [Hardhat](https://hardhat.org) as a development environment for compiling, testing, and deploying the contracts.

# Testing

### Run Tests

`yarn test`

### Run Coverage

`yarn coverage`

### Deployments

`yarn deploy:mainnet`

`yarn deploy:rinkeby`

### Verify Deployments

`yarn verify:rinkeby`

`yarn verify:mainnet`

# Reports

## Coverage

The coverage report is available [here](https://www.notion.so/primitivefi/Coverage-Report-b49c6f99571c4307aa78c9a0c0175ca2).

## Gas

The gas report is available [here](https://www.notion.so/primitivefi/Gas-Report-9d89c906edec48ec9c4afe6209277f19).

# Contributing

Join the developers and team in the Primitive discord: [Discord](https://discord.gg/JBM6APT)

# Security

The disclosure of security vulnerabilities helps us ensure the security of our users.

How to report a security vulnerability?

If you believe you’ve found a security vulnerability in one of our contracts or platforms, send it to us by emailing [security@primitive.finance](mailto:security@primitive.finance). Please include the following details with your report:

- A description of the location and potential impact of the vulnerability.
- A detailed description of the steps required to reproduce the vulnerability.
npm package: @primitivefi/v1-connectors
Description: Smart contracts designed to bridge Primitive to other protocols.
Author: Primitive
Latest version: 2.2.1

# Primitive V1 Connectors Contract Repository

## Documentation

The database of Primitive protocol contracts and documentation is hosted on notion here: [Primitive Protocol HQ](https://www.notion.so/primitivefi/Primitive-Protocol-HQ-fc081b939bb04e2a90ccaebf36faa78e)

## Immunefi Bug Bounty

[\$25,000 Bug Bounty](https://immunefi.com/bounty/primitive/)

## Contracts

Primitive is a protocol for decentralized option tokens.

These connector contracts bundle operations from other protocols or useful tools with Primitive V1 contract operations.

The live contract addresses are [here](https://www.notion.so/primitivefi/dc3b883ff9d94044b6738701b2826f7a?v=9e56507d430d4f4fb1939242cfb23736).

We use [Hardhat](https://hardhat.org) as a development environment for compiling, testing, and deploying the contracts.

## Testing

Primitive is live on Rinkeby and Kovan testnets.

### Run Tests

`yarn test`

### Run Coverage

`yarn coverage`

### Deployments

`yarn deploy:mainnet`

`yarn deploy:rinkeby`

### Verify Deployments

`yarn verify:rinkeby`

`yarn verify:mainnet`

# Contributing

Join the developers and team in the Primitive discord: [Discord](https://discord.gg/JBM6APT)

# Security

The disclosure of security vulnerabilities helps us ensure the security of our users.

How to report a security vulnerability?

If you believe you’ve found a security vulnerability in one of our contracts or platforms, send it to us by emailing security@primitive.finance. Please include the following details with your report:

- A description of the location and potential impact of the vulnerability.
- A detailed description of the steps required to reproduce the vulnerability.
npm package: @primitives/block
Description: `Block` is a box that holds other components inside. It can be styled to some limited extent. The closest analogs are:
Latest version: 3.1.0

`Block` is a box that holds other components inside. It can be styled to some limited extent. The closest analogs are:

- `div` in Web
- `View` in Native

```ts
type TBlock<TRef, TStyles> = {
  ref?: Ref<TRef>,
  style?: TStyles,
  id?: string,
  width?: number,
  height?: number,
  top?: number,
  right?: number,
  bottom?: number,
  left?: number,
  opacity?: number,
  isFloating?: boolean,
  shouldIgnorePointerEvents?: boolean,
  shouldStretch?: boolean,
  children?: ReactNode,
  onPointerEnter?: () => void,
  onPointerLeave?: () => void
}
```

> ⚠️`TStyles` and `TRef` differ on Native and Web given each one’s different environment-specific elements and document-models.
npm package: @primitives/border
Description: The `<Border>` primitive is designed to circumvent a couple of issues that could be source of headaches developing on a broad cross-platform system.
Latest version: 3.1.0

The `<Border>` primitive is designed to circumvent a couple of issues that could be source of headaches developing on a broad cross-platform system.

## Usage

```jsx
import React from 'react'
import { Border } from '@primitives/border'
import { Block } from '@primitives/border'
import { Text } from '@primitives/text'

const HelloWorld = () => (
  <Block>
    <Border
      topWidth={2}
      rightWidth={2}
      bottomWidth={2}
      leftWidth={2}
      color={[240, 0, 230, 1]}
    />
    <Text>Hello World!!</Text>
  </Block>
)
```

## Properties

| Property          | Type     | Description                       | Required |
| ----------------- | -------- | --------------------------------- | -------- |
| Color             | `TColor` | \*                                | yes      |
| topLeftRadius     | `number` | `px` to top left radius           |          |
| topRightRadius    | `number` | `px` to top right radius          |          |
| bottomRightRadius | `number` | `px` to bottom right radius       |          |
| bottomLeftRadius  | `number` | `px` to bottom left radius        |          |
| topWidth          | `number` | `px` top width                    |          |
| rightWidth        | `number` | `px` right width                  |          |
| bottomWidth       | `number` | `px` bottom width                 |          |
| leftWidth         | `number` | `px` left width                   |          |
| overflowBottom    | `number` | `px` offset from bottom container |          |
| overflowLeft      | `number` | `px` offset from left container   |          |
| overflowRight     | `number` | `px` offset from right container  |          |
| overflowTop       | `number` | `px` offset from top container    |          |

*`TColor`: a tuple that will translate to `rgba` format, comes [Colorido](https://www.npmjs.com/package/colorido)

## Borders in Native vs Borders in the Web

CSS [box-model](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model) offers an alternative in the web which approximates the bounding area to the one designers are more used to think. So, for web it‘s now a widespread good practice to work with `box-sizing: border-box` set at the top of an application global styles.

Though in React Native it‘s a different story. There is no alternative and the box-model is always `content-box`. In addition, there aren‘t many display types, being `flex` the norm there.

This is likely to cause slight discrepancies in the layout that are perceivable to every user and could disrupt the experience when setting borders or using any of the popular border hacks (with wrapping elements).
npm package: @primitives/button
Description: `Button` is an element that receives pointer-like interactions. It can't be styled at all: it is designed to simply get out of the way and provide handlers for the interaction in the area covered by its children.
Latest version: 3.1.0

`Button` is an element that receives pointer-like interactions. It can't be styled at all: it is designed to simply get out of the way and provide handlers for the interaction in the area covered by its children.

## Hover-like handlers

- `onPointerEnter`: triggered when the pointer goes above the area of the component
- `onPointerLeave`: triggered when the pointer goes out of the area of the component

These map to Web only:

- `onPointerEnter` -> `onMouseEnter`
- `onPointerLeave` -> `onMouseLeave`

React Native does not currently support hover-like actions.

## Press-like handlers

- `onPress`: triggered when a complete press action is done on the component
- `onPressIn`: triggered when the component is being pressed
- `onPressOut`: triggered when the component stops being pressed

In Web:

- `onPress` -> `onClick`
- `onPressIn` -> `onMouseDown`
- `onPressOut` -> `onMouseUp`

In Native:

- `onPress` -> `onPress`
- `onPressIn` -> `onPressIn`
- `onPressOut` -> `onPressOut`

## Focus-like handlers

- `onFocus`: triggered when the component gets the focus
- `onBlur`: triggered when the component looses the focus

These map to Web only:

- `onFocus` -> `onFocus`
- `onBlur` -> `onBlur`

React Native does not currently support focus-like actions on Touchable components.

## Raw type definitions

```ts
export type TIsHoveredHandlers = {
  onPointerEnter?: () => void,
  onPointerLeave?: () => void
}

export type TIsPressedHandlers = {
  onPressIn?: () => void,
  onPressOut?: () => void
}

export type TIsFocusedHandlers = {
  onFocus?: () => void
  onBlur?: () => void
}

export type TButtonProps = {
  id?: string,
  accessibilityLabel?: string,
  isDisabled?: boolean,
  shouldStretch?: boolean,
  onPress?: () => void
} & TIsHoveredHandlers & TIsPressedHandlers & TIsFocusedHandlers
```
npm package: @primitives/checkbox
Description: `Button` is an element that receives pointer-like interactions. It can't be styled at all: it is designed to simply get out of the way and provide handlers for the interaction in the area covered by its children.
Latest version: 3.1.0

`Button` is an element that receives pointer-like interactions. It can't be styled at all: it is designed to simply get out of the way and provide handlers for the interaction in the area covered by its children.

## Hover-like handlers

- `onPointerEnter`: triggered when the pointer goes above the area of the component
- `onPointerLeave`: triggered when the pointer goes out of the area of the component

These map to Web only:

- `onPointerEnter` -> `onMouseEnter`
- `onPointerLeave` -> `onMouseLeave`

React Native does not currently support hover-like actions.

## Press-like handlers

- `onToggle`: triggered when a complete press action is done on the component
- `onPressIn`: triggered when the component is being pressed
- `onPressOut`: triggered when the component stops being pressed

In Web:

- `onToggle` -> `onClick`
- `onPressIn` -> `onMouseDown`
- `onPressOut` -> `onMouseUp`

In Native:

- `onToggle` -> `onValueChange`
- `onPressIn` -> `onPressIn`
- `onPressOut` -> `onPressOut`

## Focus-like handlers

- `onFocus`: triggered when the component gets the focus
- `onBlur`: triggered when the component looses the focus

These map to Web only:

- `onFocus` -> `onFocus`
- `onBlur` -> `onBlur`

React Native does not currently support focus-like actions on Touchable components.

## Raw type definitions

```ts
export type TIsHoveredHandlers = {
  onPointerEnter?: () => void,
  onPointerLeave?: () => void
}

export type TIsPressedHandlers = {
  onPressIn?: () => void,
  onPressOut?: () => void
}

export type TIsFocusedHandlers = {
  onFocus?: () => void
  onBlur?: () => void
}

export type TButtonProps = {
  id?: string,
  accessibilityLabel?: string,
  isDisabled?: boolean,
  shouldStretch?: boolean,
  onToggle?: () => void
} & TIsHoveredHandlers & TIsPressedHandlers & TIsFocusedHandlers
```
npm package: @primitives/image
Description: `Image` is an element that allowed to render an image.  Only the image scaling can be styled.
Latest version: 3.1.0

`Image` is an element that allowed to render an image. 
Only the image scaling can be styled.

These map to the same corresponding props in Web and in React Native.

## Raw type definitions

```ts
export type TImage = {
  id?: string,
  alt?: string,
  source: string,
  height: number,
  width: number,
  borderRadius?: number,
}

export type TImageWeb = {
  resizeMode?: string
}

export type TImageNative = {
  resizeMode?: ImageResizeMode,
}

```
npm package: @primitives/input
Description: `Input` is an element that provides a space where the user can enter text. Only the text properties of it can be styled.
Latest version: 4.1.0

`Input` is an element that provides a space where the user can enter text. Only the text properties of it can be styled.

## Editing text handler

- `onChange`:

## Focus-like handlers

- `onFocus`: triggered when the component gets the focus
- `onBlur`: triggered when the component looses the focus

These map to the same corresponding props in Web and in React Native.

## Raw type definitions

```ts
export type TInputProps = {
  id?: string,
  isDisabled?: boolean,
  color?: string,
  family?: string,
  height?: number,
  weight?: number,
  size?: number,
  lineHeight?: number,
  letterSpacing?: number,
  paddingBottom?: number,
  paddingLeft?: number,
  paddingRight?: number,
  paddingTop?: number,
  shouldStretch?: boolean,
  value: string,
  width?: number,
  onChange: (newValue: string) => void,
  onSubmit?: () => void,
  onFocus?: () => void,
  onBlur?: () => void,
}
```