open-index/open-npm huggingface dataset:
npm package: @hellomonday/clamp
Description: Constrain a value to lie between two further values
Author: Terkel Gjervig
Latest version: 1.0.1

# @hellomonday/clamp

> Constrain a value to lie between two further values.


## Install

```
$ npm install --save @hellomonday/clamp
```

## Usage

```js
const clampedValue = clamp(0, 10, 100);
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/coord-pos
Description: Converts a long-lat coordinate to an XYZ position
Author: Johnny Slack
Latest version: 1.0.0

# @hellomonday/coord-pos

> Converts a long-lat coordinate to an XYZ position


## Install

```
$ npm install --save @hellomonday/coord-pos
```

## Usage

```js
const xyz = coordPos(39.7684, -86.1581);
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/emitter
Description: Used to emit events
Author: Terkel Gjervig
Latest version: 1.0.0

# @hellomonday/emitter

> A lightweight event dispatcher.


## Install

```
$ npm install --save @hellomonday/emitter
```

## Usage

```js
import Emitter from '@hellomonday/emitter';

const emitter = new Emitter();

// listen to an event
emitter.on(EVENTS.scroll, this.onScroll);

// stop listening to an event
emitter.off(EVENTS.scroll, this.onScroll);

// emit an event
emitter.emit(EVENTS.scroll, {position: 100});
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/eslint-config
Description: Default Hello Monday ESLint config
Author: Hello Monday
Latest version: 1.0.0-beta.0

# @hellomonday/eslint-config
> This is a work in progress. The infrastructure is complete but we need to regroup as a team.

Shareable configs are designed to work with the extends feature of `.eslintrc` files. Instead of using a file path for the value of extends, use your module name. In this case `@hellomonday/eslint-config`.

This config currently supports:
* TypeScript
* Prettier


## Getting Started

This is our preferred configuration for eslint. To use it:

```bash
pnpm add @hellomonday/eslint-config
```

... or using NPM:

```bash
npm install @hellomonday/eslint-config
```

and then change your `.eslintrc` to have:
```json
{
  "extends":  "@hellomonday"
}
```

> **Tip:** Remember to install peer dependencies.


## NPM Scripts

I recommend you add a `lint` NPM script to your `package.json` similar to the example below:

```json
{
  "scripts": {
    "lint": "eslint .",
  }
}
```

or if used in combination with Prettier:

```json
{
  "scripts": {
    "lint": "prettier --plugin-search-dir . --check . && eslint .",
    "format": "prettier --plugin-search-dir . --write ."
  }
}
```

## Feedback

This is config is a work in progress. Please provide feedback by adding issues and PRs on GitHub.


## Learn More

- [Creating a Shareable Config](https://eslint.org/docs/latest/developer-guide/shareable-configs#creating-a-shareable-config)
- [Using a Shareable Config](https://eslint.org/docs/latest/developer-guide/shareable-configs#using-a-shareable-config)

## TODO
- Customize rules to our liking (Team).
- Support Prettier.
- Add `import` rules.

## Copyright

Hello Monday
npm package: @hellomonday/lerp
Description: Linearly interpolate between two values (mix).
Author: Terkel Gjervig
Latest version: 1.0.0-beta.1

# @hellomonday/lerp

> Linearly interpolate between two values (mix).


## Install

```
$ npm install --save @hellomonday/lerp
```

## Usage

```js
import lerp from '@hellomonday/lerp';

const value = lerp(0, 100, 0.5); // => 50
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/map
Description: Map/lerp math function
Author: Terkel Gjervig
Latest version: 1.0.0

# @hellomonday/map

> Map one number range to another. This is also known as learp.


## Install

```
$ npm install --save @hellomonday/map
```

## Usage

```js
import map from '@hellomonday/map';

// map input from range 10-500 to 0-1
const input = 70;
const value = map(input, 10, 500, 0, 1);
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/mod
Description: Compute value of one parameter modulo another.
Author: Terkel Gjervig
Latest version: 1.0.0

# @hellomonday/mod

> Compute value of one parameter modulo another.


## Install

```
$ npm install --save @hellomonday/mod
```

## Usage

```js

```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/partial
Description: The partial utility can take a string and an optional node and return a valid HTML element
Author: Johnny Slack
Latest version: 1.0.0

# @hellomonday/partial

> The partial utility can take a string and an optional node and return a valid HTML element.


## Install

```
$ npm install --save @hellomonday/partial
```

## Usage

```js
import html from './valid-html.html';

// Where html is a valid html string and 'section' is a valid node in the string
this.element = partial(html, 'section');

```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/random
Description: Get a random number within a range
Author: Terkel Gjervig
Latest version: 1.0.0-beta.1

# @hellomonday/random

> Get a random number within a range


## Install

```
$ npm install --save @hellomonday/random
```

## Usage

```js
const A = random(0, 200);

const B = random(-1000, 20);

const C = random(1, 0);
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/state
Description: A simple module for state management
Author: Johnny Slack
Latest version: 1.0.3

# @hellomonday/state

> A simple module for state management. Add key/value pairs and listen to changes on the key's value.


## Install

```
$ npm install --save @hellomonday/state
```

## Usage

```js
  const CURRENT_SECTION = 'currentSection';
  const state = new State();

  state.on(CURRENT_SECTION, async (state: any) => {
    // The state will return 'current' and 'previous' values
    state.previous.animateOut();
    state.current.animateIn();
  });

  state.setValue(CURRENT_SECTION, new Home());
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomonday/swap-dom
Description: This module will load in a piece of DOM and swap it with the current DOM given a selector.
Author: Johnny Slack
Latest version: 1.1.0

# @hellomonday/swap-dom

> This module will load in a piece of DOM and swap it with the current DOM given a selector.


## Install

```
$ npm install --save @hellomonday/swap-dom
```

## Usage

```js
await oldSection.animateOut();
await swapDOM('/blog', 'main');
await newSection.animateIn();
```

## License

MIT © [Hello Monday](https://hellomonday.com)
npm package: @hellomouse/babel-plugin-dynamic-import
Description: Babel plugin to transpile import() to a deferred require(), for node
Author: Jordan Gensler
Latest version: 2.1.0-custom.2

# babel-plugin-dynamic-import-node

Babel plugin to transpile `import()` to a deferred `require()`, for node. Matches the [proposed spec](https://github.com/domenic/proposal-import-function).

**NOTE:** Babylon >= v6.12.0 is required to correctly parse dynamic imports.

## Installation

```sh
npm install babel-plugin-dynamic-import-node --save-dev
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["dynamic-import-node"]
}
```

### Via CLI

```sh
$ babel --plugins dynamic-import-node script.js
```

### Via Node API

```javascript
require('babel-core').transform('code', {
  plugins: ['dynamic-import-node']
});
```

### Code Example
```javascript
Promise.all([
  import('./lib/import1'),
  import('./lib/import2')
 ]).then(([
   Import1,
   Import2
  ]) => {
   console.log(Import1);
   /* CODE HERE*/
  });
```
npm package: @hellomouse/babel-preset-react-app
Description: Babel preset used by Create React App
Latest version: 5.0.2-custom.2

# babel-preset-react-app

This package includes the Babel preset used by [Create React App](https://github.com/facebook/create-react-app).<br>
Please refer to its documentation:

* [Getting Started](https://github.com/facebook/create-react-app/blob/master/README.md#getting-started) – How to create a new app.
* [User Guide](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) – How to develop apps bootstrapped with Create React App.

## Usage in Create React App Projects

The easiest way to use this configuration is with [Create React App](https://github.com/facebook/create-react-app), which includes it by default. **You don’t need to install it separately in Create React App projects.**

## Usage Outside of Create React App

If you want to use this Babel preset in a project not built with Create React App, you can install it with following steps.

First, [install Babel](https://babeljs.io/docs/setup/).

Then install babel-preset-react-app.

```sh
npm install babel-preset-react-app --save-dev
```

Then create a file named `.babelrc` with following contents in the root folder of your project:

```js
{
  "presets": ["react-app"]
}
```

This preset uses the `useBuiltIns` option with [transform-object-rest-spread](http://babeljs.io/docs/plugins/transform-object-rest-spread/) and [transform-react-jsx](http://babeljs.io/docs/plugins/transform-react-jsx/), which assumes that `Object.assign` is available or polyfilled.

## Usage with TypeScript

To use this package with [`@babel/preset-typescript`](https://www.npmjs.com/package/@babel/preset-typescript), you need to disable `@babel/preset-flow` first.

You can achieve this by doing:

```
{
  "presets": [
    ["react-app", {
        "flow": false
    }],
    "@babel/typescript"
  ]
}
```
npm package: @hellomouse/confusing-browser-globals
Description: A list of browser globals that are often used by mistake instead of local variables
Latest version: 1.0.0

# confusing-browser-globals

A curated list of browser globals that commonly cause confusion and are not recommended to use without an explicit `window.` qualifier.

## Motivation

Some global variables in browser are likely to be used by people without the intent of using them as globals, such as `status`, `name`, `event`, etc.

For example:

```js
handleClick() { // missing `event` argument
  this.setState({
  	text: event.target.value // uses the `event` global: oops!
  });
}
```

This package exports a list of globals that are often used by mistake. You can feed this list to a static analysis tool like ESLint to prevent their usage without an explicit `window.` qualifier.


## Installation

```
npm install --save confusing-browser-globals
```


## Usage

If you use Create React App, you don't need to configure anything, as this rule is already included in the default `eslint-config-react-app` preset.

If you maintain your own ESLint configuration, you can do this:

```js
var restrictedGlobals = require('confusing-browser-globals');

module.exports = {
  rules: {
    'no-restricted-globals': ['error'].concat(restrictedGlobals),
  }
};
```


## License

MIT