open-index/open-npm huggingface dataset:
npm package: @loyaltylion/typeorm
Description: loyaltylion fork
Author: Umed Khudoiberdiev
Latest version: 0.2.29-4

# @loyaltylion/typeorm

How to make changes to our fork:

- use the `loyaltylion/changes` branch
  - while you're making changes, consider rebasing it on the latest typeorm master
- make your changes -- keep everything organised with good, isolated commits in case we want to cherry pick some of these commits to get them upstream later
- install dependencies
  - some dependencies will not install when running on ARM, so we run it on a linux/amd64 container instead
  - run `docker run -it --platform linux/amd64 -v ${PWD}:/app -w /app node:12 npm install`
- to test it locally:
  - run `yarn package`
  - this will create a dist build in `build/package`
  - from inside `build/package`, run `yarn link`
  - inside projects using this fork, run `yarn link "@loyaltylion/typeorm"`. this will link it to your local build
  - each time you make a change in the fork you'll need to run `npx gulp package` in there again
- to publish:
  - adjust the package.json version from `x.x.x-y` to `x.x.x-z` (z = y + 1)
  - run `npx gulp publish`. this will publish a new version to @loyaltylion/typeorm
  - update referenced projects to use the new version from NPM: `yarn upgrade --latest @loyaltylion/typeorm`
npm package: @loyhooks/use-axios
Description: React Hook to execute a function when axios
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-axios

React Hook to execute a function when axios

## Installation

#### yarn

`yarn add @loyhooks/use-axios`

#### npm

`npm i @loyhooks/use-axios`

## Usage

```js
import React from "react";
import useBeforeLeave from "@loyhooks/use-axios";

const App = () => {
  const { loading, data, error, refetch } = useAxios({
    url: "https://yts.am/api/v2/list_movies.json"
  });
  console.log(
    `Loading:${loading}\nError:${error}\nData:${JSON.stringify(data)}`
  );
  return (
    <div className="App">
      <h1>{data && data.status}</h1>
      <h2> {loading && "Loading"}</h2>
      <button onClick={refetch}>Refetch</button>
    </div>
  );
};

```

### Arguments

| Argument      | Type     | Description                                              | Required |
| ------------- | -------- | -------------------------------------------------------- | -------- |
| onBeforeLeave | function | Function to be called when the mouse leaves the document | yes      |
npm package: @loyhooks/use-before-leave
Description: React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics.
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-before-leave

React Hook to execute a function when the mouse leaves the page. Useful to show a popup or for analytics.

## Installation

#### yarn

`yarn add @loyhooks/use-before-leave`

#### npm

`npm i @loyhooks/use-before-leave`

## Usage

```js
import React from "react";
import useBeforeLeave from "@loyhooks/use-before-leave";

function App() {
  const beforeLeave = () => console.log("User is leaving...");
  useBeforeLeave(beforeLeave);
  return <h1>Hello Nooks</h1>;
}
```

### Arguments

| Argument      | Type     | Description                                              | Required |
| ------------- | -------- | -------------------------------------------------------- | -------- |
| onBeforeLeave | function | Function to be called when the mouse leaves the document | yes      |
npm package: @loyhooks/use-confirm
Description: React Hook to ask the user for a confirmation before executing a function.
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-confirm

React Hook to ask the user for a confirmation before executing a function.

## Installation

#### yarn

`yarn add @loyhooks/use-confirm`

#### npm

`npm i @loyhooks/use-confirm`

## Usage

```js
import React from "react";
import useConfirm from "@loyhooks/use-confirm";

function App() {
  const deleteWorld = () => console.log("Deleting world...");
  const confirmDelete = useConfirm("Are you sure?", deleteWorld);
  return <button onClick={confirmDelete}>Delete the world</button>;
}
```

### Arguments

| Argument  | Type     | Description                                         | Required |
| --------- | -------- | --------------------------------------------------- | -------- |
| message   | string   | Message to show the user on the confirmation propmt | yes      |
| onConfirm | function | Function to be executed when the user confirms      | yes      |
| onCancel  | function | Function to be executed when the user cancels       | no       |

### Return

| Return value | Type     | Description                                    | Default value |
| ------------ | -------- | ---------------------------------------------- | ------------- |
| function     | function | Function wrapped around the confirmation logic | null          |
npm package: @loyhooks/use-fadein
Description: React Hook to fade in any element.
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-fade-in

React Hook to fade in any element.

## Installation

#### yarn

`yarn add @loyhooks/use-fade-in`

#### npm

`npm i @loyhooks/use-fade-in`

## Usage

```js
import React from "react";
import useFadeIn from "@loyhooks/use-fade-in";

function App() {
  const fadeIn = useFadeIn(5, 10);
  return <h1 {...fadeIn}>This will fade in.</h1>;
}
```

### Arguments

| Argument | Type   | Description                                     | Required | Default value |
| -------- | ------ | ----------------------------------------------- | -------- | ------------- |
| duration | number | Sets the duration of the transition. In seconds | no       | 1             |
| delay    | number | Delays of transition's start. In seconds        | no       | 0             |

### Return

`useScroll` returns an object containing the following:

| Name  | Type      | Description                                                               |
| ----- | --------- | ------------------------------------------------------------------------- |
| ref   | React Ref | A ref created to fadeIn the element                                       |
| style | Object    | Style object containing `{opacity:0}` to give to the element as a default |

It's recommended to just spread the returned object on the element as shown in the Usage section above.
npm package: @loyhooks/use-fullscreen
Description: React Hook to make any element go Fullscreen
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-fullscreen

React Hook to make any element go Fullscreen

## Installation

#### yarn

`yarn add @loyhooks/use-fullscreen`

#### npm

`npm i @loyhooks/use-fullscreen`

## Usage

```js
import React from "react";
import useFullscreen from "@loyhooks/use-fullscreen";

function App() {
  const onChange = isFull =>
    console.log(isFull ? "We are in Fullscreen" : "We are not in Fullscreen");
  const { element, triggerFull, exitFull } = useFullscreen(onChange);
  return (
    <div ref={element}>
      <h1>Hello</h1>
      <button onClick={triggerFull}>Make this Fullscreen</button>
      <button onClick={exitFull}>Exit Fullscreen</button>
    </div>
  );
}
```

### Arguments

| Argument | Type     | Description                                                       | Arguments        | Required |
| -------- | -------- | ----------------------------------------------------------------- | ---------------- | -------- |
| onChange | function | Function to be called when the screen goes Fullscreen or exits is | isFull : Boolean | no       |

### Return

`useFullscreen` returns an object containing the following:

| Return value | Type      | Description                                                |
| ------------ | --------- | ---------------------------------------------------------- |
| element      | React Ref | Ref to add to the element that you want to make fullscreen |
| triggerFull  | Function  | Function to make the element enter fullscreen              |
| exitFull     | Function  | Function to make the document exit fullscreen              |
npm package: @loyhooks/use-hover
Description: React Hook to detect a hover on an any React Element
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-hover

React Hook to detect a hover on an any React Element

## Installation

#### yarn

`yarn add @loyhooks/use-hover`

#### npm

`npm i @loyhooks/use-hover`

## Usage

```js
import React from "react";
import useHover from "@loyhooks/use-hover";

function App() {
  const onHover = () => console.log("Somebody hovered!");
  const markedRef = useClick(onHover);
  return <h1 ref={markedRef}>Hello Nooks</h1>;
}
```

### Arguments

| Argument | Type     | Description                                       | Required |
| -------- | -------- | ------------------------------------------------- | -------- |
| onHover  | function | Function to be called when the element is hovered | yes      |

### Return

| Return value | Type      | Description                                                     | Default value |
| ------------ | --------- | --------------------------------------------------------------- | ------------- |
| ref          | React Ref | A React Ref listening to the hover event, add it to any element | null          |
npm package: @loyhooks/use-input
Description: use input
Author: LEE ON YOU
Latest version: 1.0.0

# Usage

```js
import useInput from "@nooks/use-input"

const App = () => {
  const validator = value => !value.includes("@");
  const name = useInput("Mr. ", validator);
  return (
    <div className="App">
      <h1>Hello</h1>
      <input placeholder="Name" {...name.props} />
    </div>
  );
};
```
npm package: @loyhooks/use-network
Description: React Hook to listen when the user goes online or offline.
Author: LEE ON YOU
Latest version: 1.0.1

# @loyhooks/use-network

React Hook to listen when the user goes online or offline.

## Installation

#### yarn

`yarn add @loyhooks/use-network`

#### npm

`npm i @loyhooks/use-network`

## Usage

```js
import React from "react";
import useNetwork from "@loyhooks/use-network";

function App() {
  const onNetworkChange = isOnline =>
    console.log(isOnline ? "We are back online" : "We just got offline");
  const isOnline = useNetwork(onNetworkChange);
  return <h1>{isOnline ? "We are online" : "We are offline"}</h1>;
}
```

### Arguments

| Argument        | Type     | Description                                           | Arguments          | Required |
| --------------- | -------- | ----------------------------------------------------- | ------------------ | -------- |
| onNetworkChange | function | Function to be called when the network status changes | isOnline : Boolean | no       |

### Return

| Return value | Type    | Description                                         | Default value |
| ------------ | ------- | --------------------------------------------------- | ------------- |
| isOnline     | Boolean | A boolean representing if the user is online or not | true          |
npm package: @loyhooks/use-preventleave
Description: React Hook to prompt the user for confirmation before leaving the page. Useful when changes haven't been saved.
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-prevent-leave

React Hook to prompt the user for confirmation before leaving the page. Useful when changes haven't been saved.

## Installation

#### yarn

`yarn add @loyhooks/use-prevent-leave`

#### npm

`npm i @loyhooks/use-prevent-leave`

## Usage

```js
import React from "react";
import usePreventLeave from "@loyhooks/use-prevent-leave";

function App() {
  const { enablePrevent, disablePrevent } = usePreventLeave();
  const saveChanges = async () => {
    enablePrevent();
    await sendToApi();
    disablePrevent();
  };
  return <button onClick={saveChanges}>Save changes</button>;
}
```

### Return

| Return value | Type   | Description                                                                                                                     |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| Functions    | Object | A object containing functions `enablePrevent` and `disablePrevent`, use this functions to enable/disable the leaving prevention |
npm package: @loyhooks/use-scroll
Description: React Hook to get X/Y coordinates of current position of the scroll.
Author: LEE ON YOU
Latest version: 1.0.0

# @loyhooks/use-scroll

React Hook to get X/Y coordinates of current position of the scroll.

## Installation

#### yarn

`yarn add @loyhooks/use-scroll`

#### npm

`npm i @loyhooks/use-scroll`

## Usage

```js
import React from "react";
import useScroll from "@loyhooks/use-scroll";

function App() {
  const { x, y } = useScroll();
  return (
    <h1>
      We are in: {x} / {y}
    </h1>
  );
}
```

### Return

| Return value | Type   | Description                                                             | Default value |
| ------------ | ------ | ----------------------------------------------------------------------- | ------------- |
| Coords       | Object | An object containing the x/y coordinates of the current scroll position | `{x:0, y:0}`  |
npm package: @loyhooks/use-title
Description: React Hook to update your document's title
Author: Lee On You
Latest version: 1.0.1

# @loyhooks/use-title

React Hook to update your document's title.

## Installation

#### yarn

`yarn add @loyhooks/use-title`

#### npm

`npm i @loyhooks/use-title`

## Usage

```js
import React from "react";
import useTitle from "@loyhooks/use-title";

function App() {
  useTitle("Welcome");
  return <h1>Welcome</h1>;
}
```

### Arguments

| Argument | Type   | Description                                | Required |
| -------- | ------ | ------------------------------------------ | -------- |
| title    | string | The title you want to use on your document | yes      |
npm package: @lozada/platzom
Description: Traductor de idioma platzom
Author: Victor Lozada
Latest version: 0.1.0

# Platzom

Platzom es un idioma inventando para el curso de fundamentos de Javascript [PLatzi](https://platzi.com/).

## Descripcion

- Si la palabra termina en "ar", se le quitan esos dos caracteres
- Si la palabra inicia con Z, se le añade "pe" al final
- Si la palabra traducida tiene 10 o más letras, se debe partir a la mitad y unir con un guión del medio
- Si la palabra original es un palíndromo, ninguna regla anterior cuenta y se devuelve la misma palabra intercalando mayúsculas y minúsculas

## Instalacion

```
npm install platzom
```

## Uso

```
import platzom from 'platzom'

console.log(platzom("Programar")) // Program
console.log(platzom("Zorro")) // Zorrope
console.log(platzom("Zarpar")) // Zarppe
console.log(platzom("abecedario")) // abece-dario
console.log(platzom("sometemos")) // SoMeTeMoS

```
## Licensia

[MIT](https://opensource.org/licenses/MIT)