open-index/open-npm huggingface dataset:
npm package: @remscodes/renault-api
Description: Resources url and models to use the Renault API
Author: Rémy Abitbol
Latest version: 2.0.0

<div align="center">
    <h1>Renault API</h1>
    <p>Resources url and models to use the Renault API</p>
</div> 

<div align="center">

[![github ci](https://img.shields.io/github/actions/workflow/status/remscodes/renault-api/npm-ci.yml.svg?logo=github&label=CI&style=for-the-badge)](https://github.com/remscodes/renault-api/actions/workflows/npm-ci.yml)
[![npm version](https://img.shields.io/npm/v/@remscodes/renault-api.svg?style=for-the-badge&logo=npm)](https://www.npmjs.org/package/@remscodes/renault-api)
[![license](https://img.shields.io/github/license/remscodes/renault-api.svg?style=for-the-badge)](LICENSE)

</div>

> Get everything you need to use the Renault API into a TypeScript/JavaScript project.

## Installation

```shell
npm install @remscodes/renault-api
```

## Usage

Use `GigyaApi` or `KamereonApi` properties to get the url you want.

Each property has its own __JSDoc__ to describe what the corresponding request needs to work.

Examples :

```ts
import { GigyaApi, LoginInfoResponse } from '@remscodes/renault-api';

const url = new URL(GigyaApi.LOGIN_URL);
url.searchParams.set('apikey', GigyaApi.KEY);
url.searchParams.set('loginID', 'my-renault-login');
url.searchParams.set('password', 'my-renault-password');

const response: LoginInfoResponse = await fetch(url, { method: 'POST' }).then(r => r.json());
const { cookieValue } = response.sessionInfo;
```

```ts
import { BatteryStatusResponse, KamereonApi } from '@remscodes/renault-api';

const accountId = 'a1b2c3d4-xxxxxxxx';
const vin = 'VF1XXXXXXXXXXX';

const url = new URL(KamereonApi.READ_BATTERY_STATUS_URL(accountId, vin));
url.searchParams.set('country', 'FR');

const headers = {
  apikey: KamereonApi.KEY,
  'x-gigya-id_token': 'my-token',
};

const response: BatteryStatusResponse = await fetch(url, { method: 'GET', headers }).then(r => r.json());

const { batteryLevel, batteryTemperature } = response.data.attributes;
```

## Disclaimer

This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intentional or accidental, resulting from interaction with the Renault's API using this project.

## Credit

Resources API based on [Renault API](https://github.com/hacf-fr/renault-api) (hacf-fr) and [PyZE](https://github.com/jamesremuscat/pyze) (jamesremuscat).

## License

[MIT](LICENSE) © Rémy Abitbol.
npm package: @remy/dennis
Description: Resolves a third party email delegation service
Author: Remy Sharp
Latest version: 0.0.1

# Dennis

A module to resolve 3rd party email delegation service for single sign in via oauth.

That's to say, if my email address is remy@example.com and example.com is handled by Gmail, this module will return `google` for the given email, and I can use Google's oAuth for sign in.

## Notes

This is early stage, and far from complete. The intention is to use passportjs for auth, and passwordless pattern for unknown email delegation.
npm package: @remy/eslint
Description: My personal eslint settings
Author: Remy Sharp
Latest version: 3.2.2

# @remy/eslint

My shared (and personal) eslint configurations for different projects.

Currently supporting:

* node (node)
* jest (jest)
* next.js (next)
* create-react-app (cra)

## Usage

Add `.eslintrc.js` to the root of the project, and with `npm i -D @remy/eslint`,
add the following code:

```js
module.exports = require('@remy/eslint')('next', {
  // overrides live here
});
```

For example, to allow `console.log`:

```js
module.exports = require('@remy/eslint')('next', {
  rules: {
    'no-console': ['error', { allow: ['warn', 'error'] }],
  },
});
```

## Tip

### Don't want to copy and paste the default .eslintrc.js from here?

A bin util is provided, which echos out a default using:

```bash
npx lint-config # defaults to next
npx lint-config node # echo node config

# ideally:
npx lint-config > .eslintrc.js
```

### Async functions are not supported yet on Node 4.0.0 node/no-unsupported-features

eslint is reading from the `package.json`, and the `engines.node` value is missing (assuming you want node@latest).
npm package: @remy/merge
Description: Merge - like most tools, except also supports arrays
Author: Remy Sharp
Latest version: 1.0.2

# What?

Another merge library, but I had a need to support merging objects who also had array properties (where as lodash's merge doesn't merge arrays, only objects).

Features:

- Deep merge
- Object merging
- Array merge
- Priority from right to left

# Install

```
npm install --save @remy/merge
```

# Usage

```
const result = merge(a, b);
```

Both `a` and `b` are untouched (i.e. this method doesn't mutate).

If a the same key appears as a primitive in `a` and `b`, then the value from `b` is in the result.

If the same key appears as an array or as an object, the result is the merged result.
npm package: @remy/muto
Description: Transforms object structure to new structure based on simplistic formatting.
Author: Remy Sharp
Latest version: 1.0.0

# muto

Transforms object structure to new structure based on simplistic formatting.

Note that this module is only to simplify reoccurring use of something like `o.map(({ a, b }) => ({ a, b }))` where `o` contains many properties but the user only wants `a` and `b`.

## Usage

```js
const muto = require('@remy/muto');

const template = muto(`{ id: publicId, url }`);

const res = template({ private: 1234, publicId: 'p1', url: 'example.com' });
// res = { id: 'p1', url: 'example.com' }
```

## Limitations

This was a quick hack, so it only works on shallow objects.

## Name

_act of transforming._

Greek. Sounds neat too. ¯\\_(ツ)_/¯
npm package: @remy/nerve
Description: Next / Serve hybrid
Author: Remy Sharp
Latest version: 1.0.0

# Nerve: A hybrid Next.js & Serve server

This is a development tool for Next.js based projects that are destined for static export and serving using [Zeit's Now static hosting](https://zeit.co/now) (which uses [serve-handler](https://github.com/zeit/serve-handler) under the hood).

Specifically, `nerve` will read a configuration, apply the static rules (like `headers` and `redirects`) to requests _and_ serve your Next.js project.

**Important:** this tool is _only_ for the development phase.

## Motivation

I wanted to serve a `service-worker.js` from the root of the project, which I could do once I had exported the Next project, but not during development. I had [a server](https://git.io/fN490) but it was the same boilerplate so I decided to codify my solution.

## Usage

Install Nerve as a dev dependency or a global dependencies and run the executable `nerve` command in your Next.js project directory:

```bash
$ npm install --global @remy/nerve
$ nerve

DONE  Compiled successfully in 2585ms
INFO: Discovered configuration in `now.json`
```

## Important caveat

The config setting `"trailingSlash"` must be set to `false` during development. This is because when the client side Next.js <abb title="hot module reload">HMR</abb> looks for the URL to monitor, it does without a trailing slash, and by adding a `/` - Next responds with a `404`.

## Example

Once `nerve` is running, I can test with the `curl` command:

```bash
$ curl http://localhost:3000 -I # response from Next handler
HTTP/1.1 200 OK
X-Powered-By: Next.js 6.1.1
Cache-Control: no-store, must-revalidate
Content-Type: text/html; charset=utf-8

$ curl http://localhost:3000/service-worker.js -I # response from serve config
HTTP/1.1 200 OK
Content-Disposition: inline; filename="service-worker.js"
Content-Type: application/javascript; charset=utf-8
Cache-Control: no-cache
```

And the `now.json` config I'm using:

```json
{
  "type": "static",
  "static": {
    "trailingSlash": false,
    "headers": [
      {
        "source": "/static/service-worker.js",
        "headers": [
          {
            "key": "Cache-Control",
            "value": "no-cache"
          }
        ]
      }
    ],
    "rewrites": [
      {
        "source": "/service-worker.js",
        "destination": "/static/service-worker.js"
      },
    ]
  }
}

```

## Config support

Nerve, as per [serve](https://github.com/zeit/serve), will for a config in `package.json`, `now.json` and `serve.json` (note that Nerve does not support command line arguments).

[A full list of options can be seen here](https://github.com/zeit/serve-handler#options)

## License

- MIT / https://rem.mit-license.org
npm package: @remy/passwordless-mongostore
Description: MongoDB TokenStore for Passwordless
Author: Florian Heinemann
Latest version: 1.0.2

# Passwordless-MongoStore

Forked to upgrade bcrypt

---

This module provides token storage for [Passwordless](https://github.com/florianheinemann/passwordless), a node.js module for express that allows website authentication without password using verification through email or other means. Visit the project's website https://passwordless.net for more details.

Tokens are stored in a MongoDB database and are hashed and salted using [bcrypt](https://github.com/ncb000gt/node.bcrypt.js/).

## Usage

First, install the module:

`$ npm install passwordless-mongostore --save`

Afterwards, follow the guide for [Passwordless](https://github.com/florianheinemann/passwordless). A typical implementation may look like this:

```javascript
var passwordless = require('passwordless');
var MongoStore = require('passwordless-mongostore');

var mongoURI = 'mongodb://localhost/passwordless-simple-mail';
passwordless.init(new MongoStore(mongoURI));

passwordless.addDelivery(function (
  tokenToSend,
  uidToSend,
  recipient,
  callback
) {
  // Send out a token
});

app.use(passwordless.sessionSupport());
app.use(passwordless.acceptToken());
```

## Initialization

```javascript
new MongoStore(uri, [options]);
```

- **uri:** _(string)_ MongoDB URI as further described in the [MongoDB docs](http://docs.mongodb.org/manual/reference/connection-string/)
- **[options]:** _(object)_ Optional. This can include MongoClient options as described in the [docs](http://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#mongoclient-connect) and the ones described below combined in one object as shown in the example

Example:

```javascript
var mongoURI = 'mongodb://localhost/passwordless-simple-mail';
passwordless.init(
  new MongoStore(mongoURI, {
    server: {
      auto_reconnect: true,
    },
    mongostore: {
      collection: 'token',
    },
  })
);
```

### Options

- **[mongostore.collection]:** _(string)_ Optional. Name of the collection to be used. Default: 'passwordless-token'

## Hash and salt

As the tokens are equivalent to passwords (even though they do have the security advantage of only being valid for a limited time) they have to be protected in the same way. passwordless-mongostore uses [bcrypt](https://github.com/ncb000gt/node.bcrypt.js/) with automatically created random salts. To generate the salt 10 rounds are used.

## Tests

`$ npm test`

## License

[MIT License](http://opensource.org/licenses/MIT)

## Author

Florian Heinemann [@thesumofall](http://twitter.com/thesumofall/)
npm package: @remy/promise-throttle
Description: Throttles promises being executed, i.e. to allow no more than 10 at a time
Author: Remy Sharp
Latest version: 1.0.0

# promise-throttle

Throttles promises to `n` concurrent promises at a time.

## Usage

```js
// run 10 promises at a time
var throttle = require('promise-throttle')(10);
var request = require('request');
var urls = [...];

var promises = urls.map(function (url) {
  return throttle(function (resolve, reject) {
    request(url, function (error, res, body) {
      if (error) {
        return reject(error);
      }

      if (res.statusCode === 200) {
        return resolve(body);
      } else {
        return reject(new Error(body)); // likely error too
      }
    });
  });
});

Promise.all(promises).then(function (requestData) {
  // requestData contains all the response data
  // limiting to 10 concurrent requests at a time.
});
```
npm package: @remy/snap
Description: Creates a snapshot of a url with HTML suffix removed in favour of directories
Author: Remy Sharp
Latest version: 1.2.1

# Snap

Like `wget -r <url>` but specifically designed to support "pretty" URLs. With `wget`, a URL pointing to `/foo` would result in `/foo.html`, but this means the URL has now changed.

With `snap`, it will create the directory `/foo` and save the file to `/foo/index.html` so that the URL `/foo` still works.

## Installation

Via npm:

```
npm install @remy/snap
```

## Usage



```
$ snap <url> # saves to directory matching the domain
$ snap <url> --output <dir>
$ snap <url> -o <dir> # short hand
```

## Example usage

This is how I'm using `snap` in an Express web site to generate a static copy of the site before deploying to Amazon S3.

The scripts section of my `package.json`:

```
{
  "scripts": {
    "start": "node .",
    "prebuild": "NODE_ENV=production PORT=7331 node . & echo $! > .pid; sleep 1",
    "build": "snap http://localhost:7331 -o www; kill $(cat .pid); rm .pid"
  },
  "devDependencies": {
    "@remy/snap": "^1.0.1"
  }
}
```

## Notes and limitations

- If the output directory already exists, it will be removed first by `snap`
- Crawling is limited to the domain specified
- Speed and interval has been set to run as fast as possible, so this is ideally used with local domains
- There are no other arguments to `snap`, if further customisation is needed, please send a PR or look at using [simplecrawler](https://www.npmjs.com/simplecrawler)
npm package: @remy/unpack
Description: Unpacks bytes ala Perl's unpack
Author: Remy Sharp
Latest version: 2.1.7

# unpack (and pack)

JavaScript module for unpacking and packing based loosely around the Perl packing syntax.

Working demo can be found at [unpack.isthe.link](https://unpack.isthe.link).

Lookup table for unpacking:

- `a` A string with arbitrary binary data, will be null padded.
- `A` text (ASCII) string, will be space padded.
- `b` A bit string (ascending bit order inside each byte).
- `c` A signed char (8-bit) value.
- `C` An unsigned char (octet) value.
- `s` A signed short (16-bit) value.
- `S` An unsigned short value.
- `i` A signed integer (32-bit) value.
- `I` A unsigned integer value.
- `l` A signed long (64-bit) value.
- `L` An unsigned long value.
- `n` An unsigned short (16-bit) in "network" (big-endian) order.
- `N` An unsigned long (32-bit) in "network" (big-endian) order.
- `f` A single-precision float in native format.
- `d` A double-precision float in native format.
- `x` A null byte (a.k.a ASCII NUL, "\000", chr(0))

Each type can also include a number, such as `A5` will unpack to a 5 byte ascii string.

Unless otherwise stated, endianness can be set to _little_ by using `<`, such as: `<I I L` unpacks using little endian 2 32bit unsigned ints and 1 64 bit long.
npm package: @remy/webmention
Description: Web Mentions sender
Author: Remy Sharp
Latest version: 1.5.0

# webmention.app

## Automate your outgoing webmentions

[webmention.app](https://webmention.app) is a platform agnostic service that will check a given URL for links to other sites, discover if they support webmentions, then send a webmention to the target.

This repository also includes a stand alone command line tool that doesn't rely on [webmention.app](https://webmention.app) at all and doesn't require a token - so you can run it locally with the knowledge that if your site outlives this one, the tool will still work.

### Installation

The tool uses nodejs and once nodejs is installed, you can install the tool using:

```
$ npm install @remy/webmention
```

This provides an executable under the command webmention (also available as wm). Default usage allows you to pass a filename (like a newly generated RSS feed) or a specific URL. It will default to the 10 most recent entries found (using item for RSS and `h-entry` for HTML).

### Usage

By default, the command will perform a dry-run/discovery only. To complete the notification of webmentions use the `--send` flag.

The options available are:

- `--send` (default: false) send the webmention to all valid endpoints
- `--limit n` (default: 10) limit to n entries found
- `--debug` (default: false) print internal debugging
Using npx you can invoke the tool to read the latest entry in your RSS feed:

```
$ npx webmention https://yoursite.com/feed.xml --limit 1 --send
```

Alternatively, you can make the tool part of your build workflow and have it execute during a postbuild phase:

```json
{
  "scripts": {
    "postbuild": "webmention dist/feed.xml --limit 1 --send"
  }
}
```

## Misc

- Further documentation found on [webmention.app/docs](https://webmention.app/docs)
- Built by [@rem](https://remysharp.com)
- MIT / [rem.mit-license.org](https://rem.mit-license.org/)
npm package: @remy90/payload-conditions-plugin
Description: plugin for Payload CMS, which enables conditional logic for pages to display
Author: Remy
Latest version: 0.2.2

# Payload conditions

This plugin provides criteria for conditional content, which can be specified by content writers. It uses existing payload select components and currently allows for boolean, multiple choice and input text string answer types.

> [!IMPORTANT]
> This package is for v3 (currently in alpha) and above.

## Installation
```shell
pnpm add payload-conditions-plugin
```

## How to use
- Add this package
- Declare questions and answers from the question &amp; answer pairs
- Specify the question-answer combinations that results in a page being shown

#### If you've found this plugin helpful, please leave a star ⭐️
npm package: @remyar/react-mtg-svg
Description: React component for mtg icons in svg
Author: Remy ARNAUDIN
Latest version: 1.0.0

# react-mtg-svg
Mtg Icon in svg for react

## Installation
This library was built with React >=18
in mind. It *might* work on lower versions
as well, but the lib is developed for and tested on those versions.
```
npm install @remyar/react-mtg-svg --save
```

## Usage
The lib exposes the following component:

class is optionnal
height is optionnal
width is optionnal

### MtgSvg
``` javascript
import MtgSvg from '../mtgSvg'
...

function YourReactComponent(props) {
    return <div>
        <MtgSvg
            svgName={"svg_" + block.code}
            class={"rarity_" + card.rarity}
            height="24px"
            width="24px"
        />
        </div>
}

export default YourReactComponent;
```
npm package: @remyar/react-navigation
Description: Navigation Provider for react
Author: Remy ARNAUDIN
Latest version: 2.0.9

# react-navigation
Navigation provider for react

## Installation
This library was built with React >=18 and react-router-dom >=6.26.2 in mind. It *might* work on lower versions
as well, but the lib is developed for and tested on those versions.
```
npm install @remyar/react-navigation --save
```

## Usage
The lib exposes the following methods:

### NavigationProvider
```javascript
import { NavigationProvider } from '@remyar/react-navigation';
...

 root.render(
        <React.Fragment>
            <NavigationProvider>
                 <App /> --> Your Application
            </NavigationProvider>
        </React.Fragment>
    );
``` 

### withNavigation
``` javascript
import { withNavigation } from '@remyar/react-navigation';
...

function YourReactComponent(props) {
    return <div>
        <MenuItem onClick={() => {
                props.navigation.push("/index.html");
            }}>
        </MenuItem>
        <MenuItem onClick={() => {
                props.navigation.goBack();
            }}>
        </MenuItem>
        <MenuItem onClick={() => {
                let actualPath = props.navigation.getPath();
            }}>
        </MenuItem>
        </div>
}

export default withNavigation(YourReactComponent);
```
npm package: @remyar/react-snackbar
Description: Snackbar Provider for react
Author: Remy ARNAUDIN
Latest version: 1.0.4

# react-snackbar
Snackbar provider for react

## Installation
This library was built with React >=18 in mind. It *might* work on lower versions
as well, but the lib is developed for and tested on those versions.
```
npm install @remyar/react-snackbar --save
```

## Usage
The lib exposes the following methods:

### SnackbarProvider
```javascript
import { StoreProvider } from '@remyar/react-snackbar';
...

 root.render(
        <React.Fragment>
            <SnackbarProvider>
                 <App /> --> Your Application
            </SnackbarProvider>
        </React.Fragment>
    );
``` 

### withSnackBar
``` javascript
import { withSnackBar } from '@remyar/react-snackbar';
...

function YourReactComponent(props) {
    
    return <div>
        <MenuItem onClick={() => {
                props.snackbar.error("error text");
            }}>
        </MenuItem>
        <MenuItem onClick={() => {
                props.warning.warning("warning text");
            }}>
        </MenuItem>
        <MenuItem onClick={() => {
                props.warning.success("success text");
            }}>
        </MenuItem>
        <MenuItem onClick={() => {
                props.info.error("info text");
            }}>
        </MenuItem>
        </div>
}

export default withStoreProvider(YourReactComponent);
```
npm package: @remyar/react-store
Description: Store Provider for react
Author: Remy ARNAUDIN
Latest version: 2.0.9

# react-navigation
Navigation provider for react

## Installation
This library was built with React >=18 in mind. It *might* work on lower versions
as well, but the lib is developed for and tested on those versions.
```
npm install @remyar/react-store --save
```

## Usage
The lib exposes the following methods:

### StoreProvider
```javascript
import { StoreProvider } from '@remyar/react-store';
...

 root.render(
        <React.Fragment>
            <StoreProvider extra={{}} globalState={{}} persistConfig={{}}>
                 <App /> --> Your Application
            </StoreProvider>
        </React.Fragment>
    );
``` 

### withStoreProvider
``` javascript
import { withStoreProvider } from '@remyar/react-store';
...

function YourReactComponent(props) {

    const globalState = props.globalState
    
    return <div>
        <MenuItem onClick={() => {
                await props.dispatch(actions.database.get());
            }}>
        </MenuItem>
        </div>
}

export default withStoreProvider(YourReactComponent);
```