open-index/open-npm huggingface dataset:
npm package: @fcoded/adonis-hashids
Description: A package to generate YouTube-like IDs for AdonisJS Lucid models
Author: Ewurum Okwukwe
Latest version: 1.0.2

# adonis-hashids

> Hashids for AdonisJS 5

[![gh-workflow-image]][gh-workflow-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![download-image]][download-url]


> **This package generates YouTube-like IDs for AdonisJS Lucid models using the `hashids.js` package.  [hashids.js](https://github.com/niieani/hashids.js) is small JavaScript library to generate YouTube-like ids from numbers. Use it when you don't want to expose your database ids to the user.** 

## **Prerequisites**
- [Adonis Lucid](https://docs.adonisjs.com/guides/database/introduction) to be installed and configured

- The db table must have a column named `hashid` of type `string` and it must be `nullable`.


## **Installation**

```
npm i @fcoded/adonis-hashids or  yarn add @fcoded/adonis-hashids
```

## Configuration

```
node ace configure @fcoded/adonis-hashids
```

The configuration file is in `config/hashids.ts`. The default `salt` will be the project name, the default `minLength` is 12 and it uses the default `alphabet` from the [hashids.js](https://github.com/niieani/hashids.js) package.

## **Using the Hashids Mixin**

Apply the mixin on the model you.

```typescript
import { compose } from '@ioc:Adonis/Core/Helpers'
import { column, BaseModel } from '@ioc:Adonis/Lucid/Orm'
import { LucidHashIds } from '@ioc:Adonis/Adons/LucidHashIds'

export default class User extends compose(BaseModel, LucidHashIds){

}
```

The mixin will update the `hashid` column after the recorded is created using the `afterCreate` **Model** hook

Also, if you are using `Route model binding` package, the `routeLookupKey` will be set to the `hashid` by default.

[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/eokwukwe/adonis-hashids/test.yml?style=for-the-badge
[gh-workflow-url]: https://github.com/eokwukwe/adonis-hashids/actions/workflows/test.yml "Github action"

[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[typescript-url]:  "typescript"

[npm-image]: https://img.shields.io/npm/v/@fcoded/adonis-hashids/latest.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@fcoded/adonis-hashids/v/latest "npm"

[license-image]: https://img.shields.io/npm/l/@fcoded/adonis-hashids?color=blueviolet&style=for-the-badge
[license-url]: LICENSE.md "license"

[download-image]: https://img.shields.io/npm/dm/%40fcoded/adonis-hashids?style=for-the-badge&logo=npm&label=Downloads
[download-url]: "download"
npm package: @fcodelabs/react-helper-hooks
Description: A Custom Set of Helper Hooks written in Typescript to Make Your Life Easier.
Author: Dulaj Ariyaratne
Latest version: 0.0.1


# @fcodelabs/react-helper-hooks

A Custom Set of Helper Hooks written in Typescript to Make Your Life Easier.

## Demo

See working Demo [Here](https://fcodelabs.github.io/react-helper-hooks)

## Installation

Install with npm

```bash
  npm install @fcodelabs/react-helper-hooks
```
Install with yarn

```bash
  yarn add @fcodelabs/react-helper-hooks
```


## List of Hooks

- [useWindowSize](#useWindowSize) - Get current window size and device type (Desktop or Mobile) based on your breakpoint
- [useLocalStorage](#useLocalStorage) - Sync your state with browser localStorage. Works same as the `useState` hook. Automatically sync with localStorage value changes.

<a id="useWindowSize"></a>
### useWindowSize

This hook is useful when you want to get the window size as height and width.

**It takes one argument**
- `breakpoint: number `

Breakpoint for mobile in pixels

```
const { windowSize, isDesktop } = useWindowSize(1024);
```

#### windowSize
```
const { windowSize } = useWindowSize(1024);

// {width: 1368, height: 1024}
```
#### isDesktop
```
const { isDesktop } = useWindowSize(1024);

# If window size less than 1024
// false

# If window size greater than 1024
// true
```

<a id="useLocalStorage"></a>
### useLocalStorage

This hook is useful when you want to use localStorage as your state. It works same almost same as `useState` hook, which means it will sync the localstorage value changes automatically.

**It takes two arguments**
- `key: string`

LocalStorage key (This will be the key that your state will be saved)

- `initialState: any`

Initial state value. It could be in any of data type such as `string`, `number`, `boolean`, `object`, `array` or `custom interfaces`.

```
## Javascript

const [ count, setCount ] = useLocalStorage('count', 0);
```

```
## Typescript

const [ count, setCount ] = useLocalStorage<number>('count', 0);
```


## Support

If you find any bugs please report an issue, so it can be fixed. If you have any suggestions that would improve the hooks, please let us know. Feel free to contribute in any way!

**We hope this package can be useful for you in someway.**
npm package: @fcofabricio/primevue
Description: [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)
Latest version: 2.4.2-SNAPSHOT


[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue)

[![PrimeVue Hero](https://www.primefaces.org/wp-content/uploads/2020/08/primevue-promo.jpg)](https://www.primefaces.org/primevue)

### Website

Visit the [PrimeVue Website](https://www.primefaces.org/primevue/) for general information, demos and documentation.
npm package: @fcojunr/ngx-i18n
Description: Based on the way iOS and Android work, this library was developed for i18n application in Angular applications in a practical and fast way.
Author: Fco Junior
Latest version: 0.0.6

# ngx-i18n

Based on the way iOS and Android work, this library was developed for i18n application in Angular applications in a practical and fast way.

## Instalation
Get package on npm:
```
npm i @fcojunr/ngx-i18n --save
```
or yarn:
```
yarn add @fcojunr/ngx-i18n --save
```

## Configuration
Configure in your `app.modules.ts` the component `NgxI18nModule` 

```
import { NgxI18nModule } from  '@fcojunr/ngx-i18n';
...
imports: [
...
	NgxI18nModule.forRoot({
		directory: 'assets/i18n',
		defaultLocale: 'pt-BR',
		locale: navigator.language
	}),
...
```
| Property      | Description |
|--|--|
| directory     | Source here your json files  |
| defaultLocale | Will be used case browser locale not found  |
| locale        | Current locale |

### Configure path i18n
Create in your application a folder into `assets` with named `i18n`, and add json files for respective languages.
The json files will be named conform [ISO Language Code Table](http://www.lingoes.net/en/translator/langcode.htm).

## Usage
Add `ngx-i18n` attribute on tags that will have your text modified.
```
<p ngx-i18n="label_key">Lorem ipsum</p>
```
The content of tag will be replaced by value which was defined in the json language.
npm package: @fcollonval/jupyterlab_shutdown
Description: A `Quit` entry in File menu.
Author: Frederic Collonval
Latest version: 1.1.1

# jupyterlab_shutdown

> This extension is decrepated as it was introduced in JupyterLab >=0.34.6

A `Quit` entry in File menu.

This extension is based on https://github.com/jupyter/notebook/pull/3004 .
Warning: It does not use the option `NotebookApp.shutdown_button` introduce 
for the classical notebook as JupyterLab separates more the frontend and the backend.
See https://github.com/jupyterlab/jupyterlab/issues/2790 .

![quit](demo_quit.gif)

## Prerequisites

* JupyterLab

## Installation

```bash
jupyter labextension install @fcollonval/jupyterlab_shutdown
```

## Development

For a development install (requires npm version 4 or later), do the following in the repository directory:

```bash
npm install
npm run build
jupyter labextension link .
```

To rebuild the package and the JupyterLab app:

```bash
npm run build
jupyter lab build
```
npm package: @fcostarodrigo/exec
Description: Wrapper around node spawn process
Author: Rodrigo Fernandes da Costa
Latest version: 1.0.1

# Exec

Wrapper around node spawn process to make it easier to use.

## Features

### Promises

Command is converted to a promise.

```js
const result = await exec("echo Hello World!");
console.log(result); // Hello World!
```

### Command parser

Spaces are trimmed.

```js
const result = await exec("echo Hello     World!");
console.log(result); // Hello World!
```

Quotes and double quotes can be used to don't trim spaces.

```js
const result = await exec("echo 'Hello     World!'");
console.log(result); // Hello     World!
```

Other arguments are take literally.

```js
const result = await exec("echo", "Hello     World!");
console.log(result); // Hello     World!
```

You can use array of strings to make it easier to read.

```js
await exec("program", { env: {} }, [
  ["--option", "value"],
  ["--option", "value"],
  ["--option", "value"],
]);
```

### Other options

- `printCommand`: Print command before running it.
- `inherit`: Send output directly to the terminal. Some programs will work on "CI" mode if terminal's stdio is not inherited.
- `spinner`: Display a spinner while the command is running.
- `spawnOptions`: Override options sent to spawn.
- `proxy`: Set proxy environment variables to this value.
- `retries`: Retry running command on error.
- `timeout`: Fail command on timeout.
- `ignoreError`: Never rejects returning promise.
- `stdin`: Send text like the character `y` to the program.
- `printOutput`: When not inheriting stdio, send output from the program to the terminal.

## Changelog

[Changelog](CHANGELOG.MD)

## License

[MIT License](http://www.opensource.org/licenses/mit-license.php)
npm package: @fcostarodrigo/files
Description: Wrapper for node read and write files API,
Author: Rodrigo Fernandes da Costa
Latest version: 1.1.1

# Files

Read and write files parsing and formatting according to file extension in the file path.

## Install

```bash
npm i @fcostarodrigo/files
```

## Features

- Parse file based on extension.
- Format files using prettier.
- Create missing folders when writing files.

## Usage

```js
import { writeFile, readFile, fileExist } from "@fcostarodrigo/files";

await writeFile("user.json", { id: 123 });
const user = await readFile("user.json");
user.id; // 123

await fileExist("user.json"); // true
```

### Options

The last argument is an object with extra options.

- `extension`: Treat the file as if it has a specific extension.
- `parse`: Boolean that indicates if the file should be parsed when reading a file.
- `defaultValue`: Return default value if file doesn't exist When reading a file.
- `format`: Boolean that indicates if the file should be formatted when writing a file.

### Available formats

- `json`
- `js`: Parsed with [recast](https://github.com/benjamn/recast).
- `ts`: Parsed with [recast](https://github.com/benjamn/recast).
- `toml`
- `yaml`

## Changelog

[Changelog](CHANGELOG.MD)

## License

[MIT License](http://www.opensource.org/licenses/mit-license.php)
npm package: @fcostarodrigo/open-path
Description: Node module that creates missing folders in the middle of a path
Author: Rodrigo Fernandes da Costa
Latest version: 5.0.4

# OPEN-PATH

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0b2bc69159804aba9045f49725c09f92)](https://www.codacy.com/manual/fcostarodrigo/open-path?utm_source=github.com&utm_medium=referral&utm_content=fcostarodrigo/open-path&utm_campaign=Badge_Grade)
[![Build Status](https://travis-ci.org/fcostarodrigo/open-path.svg?branch=master)](https://travis-ci.org/fcostarodrigo/open-path)
[![codecov](https://codecov.io/gh/fcostarodrigo/open-path/branch/master/graph/badge.svg)](https://codecov.io/gh/fcostarodrigo/open-path)

Node module that creates missing folders in the middle of a path, like `mkdir -p`.

## Setup

```bash
npm install @fcostarodrigo/open-path
```

## Usage

### CLI

```bash
npm install -g @fcostarodrigo/open-path
openPath --help
```

```
openPath <pathToOpen>

Positionals:
  pathToOpen  String with the path                                      [string]

Options:
  --help            Show help                                          [boolean]
  --version         Show version number                                [boolean]
  --fileInPath, -f  Indicates if the last item of the path is a file   [boolean]
```

### Lib

```js
const openPath = require("@fcostarodrigo/open-path");

async function main() {
  await openPath("docs/UI");
  fs.writeFileSync("docs/UI/button.txt", "test");
}

main();
```

## Documentation

```js
openPath(pathToOpen, fileInPath);
```

`pathToOpen`: String with the path.

`fileInPath`: Indicates if the last item of the path is a file.

Returns a promise.

## License

[MIT License](http://www.opensource.org/licenses/mit-license.php)
npm package: @fcostarodrigo/walk
Description: Transverse files recursively
Author: Rodrigo Fernandes da Costa
Latest version: 6.0.1

# Walk

Simple node module to transverse files recursively.

## Installation

```bash
npm install @fcostarodrigo/walk
```

## Usage

```javascript
import { walk } from "@fcostarodrigo/walk";

for await (const file of walk()) {
  console.log(file);
}
```

## Documentation

```javascript
walk(root, lisFolders, walkFolder);
```

`root`: Optional folder to transverse. Defaults to `.`.

`includeFolders`: Optional flag to list folders. Defaults to `false`.

`walkFolder`: Optional callback to decide if a folder is going to be transversed.

The function is an async generator that yields the paths of the files recursively.

[Changelog](CHANGELOG.md)

## License

[MIT License](http://www.opensource.org/licenses/mit-license.php)
npm package: @fcouceiro/nutil
Description: A command-line tool for generating boilerplate (controllers, services, models and resources) based on placeholders provided by the user.
Author: Francisco Couceiro
Latest version: 0.4.1
Deprecated: WARNING: This project has been renamed to nutiljs and is no longer scoped. Install using nutiljs instead.


# nutil - Node Utility

A command-line tool for generating boilerplate (controllers, services, models and resources) based on placeholders provided by the user.

## Installation

### Globally:
* `yarn global add @fcouceiro/nutil`

or 
* `npm i -g @fcouceiro/nutil`

You will then be able to run `nutil` from the command line. 

### Locally:
* `yarn add @fcouceiro/nutil`

or 
* `npm i @fcouceiro/nutil`

Use a package runner like [npx](https://www.npmjs.com/package/npx) to run locally installed packages.

You will then be able to run `npx nutil` from the command line.

## Usage

Create a controller based on the [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/controllers):

    nutil --controller (-c) <controllerName>

  

Create a service based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/services):

    nutil --service (-s) <serviceName>

  

Create a model based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/models):

    nutil --model (-m) <modelName>

  

Create a resource based on [provided placeholder](https://github.com/fcouceiro/nutil/tree/master/placeholders/resources):

    nutil --resource (-r) <resourceName>

  
Multiple generations can take place with a single command, by concatenatig different options. Example: create both a controller and a service:

    nutil -s <serviceName> -c <controllerName>


__Note:__ Generated files will be created in the directory where you run `nutil` from (cwd)

## How it works
There is a pre-defined set of placeholder keys, as represented in the following table:

Key | Meaning
--- | ---
[name] | Singular lower case
[NAME] | Singular upper case
[Name] | Singular pascal case
[names] | Plural lower case
[NAMES] | Plural upper case
[Names] | Plural pascal case

When the user requests the generation of a certain type, the generator spawns a process that "search and replace" the corresponding type placeholders (both in file name and file content). It substitutes all found keys with the appropriate casing (e.g. [name] would be replaced by the controller name in singular lower case; [Names] in plural pascal case; etc).

Case representations are generated by the great [inflection package](https://www.npmjs.com/package/inflection).

## Placeholders
All boilerplate is generated based on placeholders provided by the user. 
Feel free to use different placeholder keys in both file name and content, as described in [How it works](#how-it-works) section.

Placeholders must be placed inside `placeholders/` folder. 

A few basic placeholders are included by default (using mongoose for model generation and [Joi](https://www.npmjs.com/package/joi) for model validation).