open-index/open-npm huggingface dataset:
npm package: @magicdawn/prettier-config
Description: @magicdawn/prettier-config
Author: magicdawn
Latest version: 0.1.0

# @magicdawn/prettier-config

> prettier config for self use

[![npm version](https://img.shields.io/npm/v/@magicdawn/prettier-config.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/prettier-config)
[![npm downloads](https://img.shields.io/npm/dm/@magicdawn/prettier-config.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/prettier-config)
[![npm license](https://img.shields.io/npm/l/@magicdawn/prettier-config.svg?style=flat-square)](http://magicdawn.mit-license.org)

## Install

```sh
$ pnpm add -D @magicdawn/prettier-config
```

## Usage

### `package.json`

```json
{
  "prettier": "@magicdawn/prettier-config"
}
```

### `prettier.config.cjs`

```js
module.exports = {
  ...require('@magicdawn/prettier-config'),
}
```

### `prettier.config.js` with `type=module`

```js
import defaultConfig from '@magicdawn/prettier-config'

export default {
  ...defaultConfig,
}
```

## Changelog

[CHANGELOG.md](CHANGELOG.md)

## License

the MIT License http://magicdawn.mit-license.org
npm package: @magicdawn/rp
Description: lightweight promise api for request
Author: magicdawn
Latest version: 0.1.0

# rp

> lightweight promise api for [request](https://github.com/request/request#requestoptions-callback)

[![Build Status](https://img.shields.io/travis/magicdawn/rp.svg?style=flat-square)](https://travis-ci.org/magicdawn/rp)
[![Coverage Status](https://img.shields.io/codecov/c/github/magicdawn/rp.svg?style=flat-square)](https://codecov.io/gh/magicdawn/rp)
[![npm version](https://img.shields.io/npm/v/%40magicdawn/rp.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/rp)
[![npm downloads](https://img.shields.io/npm/dm/%40magicdawn/rp.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/rp)
[![npm license](https://img.shields.io/npm/l/%40magicdawn/rp.svg?style=flat-square)](http://magicdawn.mit-license.org)

## Install

```sh
npm i @magicdawn/rp --save
```

## API

```js
const rp = require('@magicdawn/rp')
```

### `rp()`

```js
rp(options)
  .then(([res, body]) => {
    /* blabla */
  })
  .catch(err => {
    /* blabla */
  })
```

### `rp.<http-verb>()`

```js
rp.get(url, options)
  .then(([res, body]) => {
    /* blabla */
  })
  .catch(err => {
    /* blabla */
  })
```

### `rp.createFrom(request)`

- create a rp instance from a request instance
- the request instance can be `require('request')` or `require('request').defaults()`

### `rp.defaults(options)`

same as `rp.createFrom(request.defaults(options))`

## Changelog

[CHANGELOG.md](CHANGELOG.md)

## License

the MIT License http://magicdawn.mit-license.org
npm package: @magicdawn/x
Description: personal utils repo
Author: magicdawn
Latest version: 0.0.4

# @magicdawn/x

> personal utils repo

[![Build Status](https://img.shields.io/travis/magicdawn/@magicdawn/x.svg?style=flat-square)](https://travis-ci.org/magicdawn/@magicdawn/x)
[![Coverage Status](https://img.shields.io/codecov/c/github/magicdawn/@magicdawn/x.svg?style=flat-square)](https://codecov.io/gh/magicdawn/@magicdawn/x)
[![npm version](https://img.shields.io/npm/v/@magicdawn/x.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/x)
[![npm downloads](https://img.shields.io/npm/dm/@magicdawn/x.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/x)
[![npm license](https://img.shields.io/npm/l/@magicdawn/x.svg?style=flat-square)](http://magicdawn.mit-license.org)

## Install

```sh
$ cnpm i @magicdawn/x -S
```

## Setup

should transpile this dep

### poi.config.js

```js
module.exports = {
  babel: {
    transpileModules: ['@magicdawn/x'],
  },
}
```

### vue.config.js

```js
module.exports = {
  transpileDependencies: ['@magicdawn/x'],
}
```

## API

### vue

```js
const {preventObserve} = require('@magicdawn/x/vue')
```

## Changelog

[CHANGELOG.md](CHANGELOG.md)

## License

the MIT License http://magicdawn.mit-license.org
npm package: @magicdawn/x-args
Description: play with cli commands like a composer
Author: magicdawn
Latest version: 2.1.3

# x-args

> play with cli commands like a composer

[![npm version](https://img.shields.io/npm/v/@magicdawn/x-args.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/x-args)
[![npm downloads](https://img.shields.io/npm/dm/@magicdawn/x-args.svg?style=flat-square)](https://www.npmjs.com/package/@magicdawn/x-args)
[![npm license](https://img.shields.io/npm/l/@magicdawn/x-args.svg?style=flat-square)](http://magicdawn.mit-license.org)

## Install

```sh
$ pnpm add @magicdawn/x-args -g

# or
$ pnpm dlx @magicdawn/x-args
$ pnpx @magicdawn/x-args
$ bunx @magicdawn/x-args
```

## Commands

### `x-args` command

```sh
x-args -f './*.*' -c $'cwebp :file -o \':dir/:name_compressed.:ext\''
```

use `-t` to show available tokens

### `txt` sub command

```sh
# use :line
x-args txt ./to-be-processed.txt -c 'echo :line'
```

features that native xargs does not have

- comment, `x-args txt` support `//` or `#` comment, I suggest use `.conf` extenstion, so that editors can recognize `#` comment
- live reload, `x-args txt` read txt file, exec command, and read txt again, so edit after command start will works as well
- wait input update: use `-w,--wait`, so that this command will not exit but to wait txt file update. use `--wait-timeout 1h` to delay `1h` 1 hour.

#### Templates

- use `:line` for whole line
- use `:args0` / `:arg0` for single arg
- use `-s` / `--split` / `--args-split` to specify how to turn `:line` to `:args0`, default using `/\s+/`

when input is a filepath, and may contains space, use a different separator that has low possibility occurs in a filepath
for example

- ancient chinese character for Simplified chinese user: `__纛恚掾旒__`, `--args-split '__纛恚掾旒__'`, [出处](https://mp.weixin.qq.com/s?__biz=MjM5ODI2MTQxOQ==&mid=2653658340&idx=1&sn=32eb7031cdb585eb216ba1490f0629cd&chksm=bd125b208a65d2368daa60d158e9fc12b2997b2324a1d3938727aef3f5f4cecdd7529ea8c6b0&scene=27)
- english user, maybe a emoji combination ?

## Tips

### `-c,--command`

if need single quote in `-c,--command`, u can use `-c $'command \'inside-a-quote\''`, a special shell syntax learn from zx, see

- https://github.com/google/zx/blob/main/docs/quotes.md#quotes
- https://stackoverflow.com/a/16605140

#### `:line` / `:arg0`

this will be auto escaped, no need to manual quote, just use plain `:line` / `:arg0`

### retry

if your `-c,--command` may fail, and u need retry it. u can use https://npm.im/retry-cli

```sh
# install globally
pnpm add -g retry-cli

# add retry to `command-may-fail`
x-args txt ./to-be-processed.txt -c 'retry -- command-may-fail :line'

# retry times 1000, default: 10, see retry-cli homepage
x-args txt ./to-be-processed.txt -c 'retry -n 1000 -- command-may-fail :line'
```

## Changelog

[CHANGELOG.md](CHANGELOG.md)

## License

the MIT License http://magicdawn.mit-license.org
npm package: @magicdidac/chord-display
Description: Package to display guitar chords on react
Author: magicdidac
Latest version: 1.1.3

# @magicdidac/chord-display

A React library to easily generate guitar SVG chords display.

## Install

With npm
```sh
npm i @magicdidac/chord-display
```

With yarn
```sh
yarn add @magicdidac/chord-display
```

## Examples

Here are some examples of what the chords would look like.

![chords-screenshot]


## How to use it

```js
import { ChordDisplay, getChordByName } from '@magicdidac/chord-display'

const MyChord = () => {

  return (
    <ChordDisplay
      chord={getChordByName('C')}
      {/* chord={Chords.C} */}
    />
  )
}
```

To use the preset chords in the package you can obtain them in two different ways:

1. using the `getChordByName` function, where you will pass the name of the chord you want.
1. Using the `Chords` object, where the preset chords in the package are located.

Alternatively, you can generate your own chord by generating an object that follows the structure of the following example:

```js
{
  name: 'A',
  frets: [-1, 0, 2, 2, 2, 0]
}
```
- -1 means that this string is not played
- 0 means that the string is played in the air
- the rest of the numbers are the fret

If you need to make a capo the chord would look like this:

```js
{
  name: 'F',
  barre: 1,
  frets: [0, 2, 2, 1, 0, 0]
}
```

- the number in the `barre` property is the fret where the capo is desired
- 0 means to play the string in the air (where the capo is located)

*Note*: it is recommended to use the `Chord` interface included in the package if you use typescript

[chords-screenshot]: images/chords.png
npm package: @magicdidac/icos
Description: Package to upload images to ICOS and dialog made with MUI
Author: magicdidac
Latest version: 0.0.21

# @magicdidac/icos

Package to upload images to ICOS and dialog made with MUI.

## Install

With npm
```sh
npm i @magicdidac/icos
```

With yarn
```sh
yarn add @magicdidac/icos
```

## Examples



## How to use
npm package: @magicdidac/notifications
Description: Package to be able to use notifications in any react application
Author: magicdidac
Latest version: 1.0.8

# @magicdidac/notifications

This is a package to be able to use notifications in any react application.

## Install

With npm
```sh
npm i @magicdidac/notifications
```

With yarn
```sh
yarn add @magicdidac/notifications
```

## Examples

These are some examples of the four types of notification.

![screenshoot]


## How to use

### NotificationProvider

`index.tsx`
```js
import {NotificationProvider} from '@magicdidac/notifications'
...
<React.StrictMode>
  <NotificationProvider>
    <App />
  </NotificationProvider>
</React.StrictMode>
...
```

#### Properties

| Property  | Description                                                   | Default          | Values                                                |
|-----------|---------------------------------------------------------------|------------------|-------------------------------------------------------|
| positionX | The horizontal position where the notifications will be shown | PositionX.right  | PositionX.left \| PositionX.center \| PositionX.right |
| postionY  | The vertical position where the notifications will be shown   | PositionY.bottom | PositionY.top \| PositionY.bottom                     |
| width     | The width of the notifications                                | 400px            | string                                                |

### useNotifications

This is a hook to invoke notifications

```js
import { useNotifications } from '@magicdidac/notification'
...
const notifications = useNotifications()
...
return (
 <button onClick={() => notifications.success("Working!")}>Click Me!</button>
)
...
```

#### Functions

Every function has the same parameters
| Parameter         | Description                                                        | Optional | Default |
|-------------------|--------------------------------------------------------------------|----------|---------|
| message           | The message to show                                                |    No    |         |
| options.autoClose | Set to true to close the notification automatically over 5 seconds |    Yes   | true    |

These are all the functions

| Function |  Example |
|----------|----------|
| .success |![success]|
| .error   |![error]  |
| .warning |![warning]|
| .info    |![info]   |

[screenshoot]: images/screenshoot.png
[success]: images/success.png
[error]: images/error.png
[warning]: images/warning.png
[info]: images/info.png