open-index/open-npm huggingface dataset:
npm package: @mybug/awaitor
Description: awaitable callback
Author: mysyljr
Latest version: 0.1.4
Deprecated: deprecated, use @superjs/cb instead

# [@mybug](https://www.npmjs.com/org/mybug)/awaitor
awaitable callback. 

async/await way to call callback style functions

## deprecated
Ownership of this package has been transferred, please use [@superjs/awaitor](https://www.npmjs
.com/package/@superjs/awaitor)

## thought
If you want to convert callback style to async/await style, you can either:
1. wrap the operation to return a promise
2. just call the operation, using @mybug/awaitor as callback, like the example below  

## usage
awaitor()

return an awaitable callback, the promiseValue of which is the args array it's called with 

awaitor.norm()

same as above, but it only accept two args: `(err,value)`. If err exists, promiseValue will be `err` and rejected. 
Otherwise, promiseValue will be `value`. 
## example

```javascript
const awaitor = require('@mybug/awaitor')
// await can't be used without being wrapped by async function
;(async ()=>{
  let cb = awaitor()
  foo(1,2,cb) // whenever a callback is needed, just use cb
  let result = await cb //result is an array, containing the args cb received
  console.log(result) // [3]
})()

function foo(a,b,cb){
  setTimeout(()=>cb(a+b),1000)
}
```

## use together with [@mybug/wait](https://www.npmjs.com/package/@mybug/wait)

wait can await something synchronously. 

```javascript
const awaitor = require('@mybug/awaitor')
const wait = require('@mybug/wait')

let cb = awaitor()
foo(1,2,cb) // whenever a callback is needed, just use cb
let result = wait(cb) //result is an array, containing the args cb received
console.log(result) // [3]

function foo(a,b,cb){
  setTimeout(()=>cb(a+b),1000)
}
```

## compatibility
You can use @mybug/awaitor in both nodejs and browser environment.
npm package: @mybug/wait
Description: await anything synchronously
Author: mysyljr
Latest version: 0.1.4
Deprecated: deprecated, use @superjs/wait instead

# [@mybug](https://www.npmjs.com/org/mybug)/wait
await anything synchronously. 

Useful when you want to get the result of async operation inside a synchronous function, while rewriting the 
synchronous 
function 
to be an async one is not possible. (Maybe it's in 3rd party library, or a predefined callback like event handler, etc)

## deprecated
Ownership of this package has been transferred, please use [@superjs/wait](https://www.npmjs
.com/package/@superjs/wait)

## usage
wait(awaitable)

awaitable: a value can be awaited

return the promiseValue of awaitable just like using await, but synchronously. 

## example

```javascript
const wait = require('@mybug/wait')
const su = require('superagent')
let resp = wait(su('https://api.npms.io/v2/search?q=scope:mybug')) //async http request 
console.log(resp.body) // result is printed synchronously
```

## use together with [@mybug/awaitor](https://www.npmjs.com/package/@mybug/awaitor)

wait can resolve an operation which returns a promise, but not an operation which needs a callback.

you can either:
1. wrap the operation to return a promise
2. just call the operation, using @mybug/awaitor as callback, like below  

```javascript
const awaitor = require('@mybug/awaitor')
const wait = require('@mybug/wait')

let cb = awaitor()
foo(1,2,cb) // whenever a callback is needed, just use cb
let result = wait(cb) //result is an array, containing the args cb received
console.log(result) // [3]

function foo(a,b,cb){
  setTimeout(()=>cb(a+b),1000)
}
```

## also useful as debug tool
When being paused on a breakpoint, you can evaluate expressions but no async operations can be evaluated 
immediately.

Using @mybug/wait, you can evaluate an async operation, get the result of it, while still being paused
 on the breakpoint.

Just evaluate `wait(anyAsyncOperation())`, 
you will see the 
async operation gets done and returned.

You don't even have to require @mybug/wait in your code. Just install @mybug/wait as a devDependency. When debugging, 
evaluate `global.wait=process.mainModule.require('@mybug/wait')`. That's all.
npm package: @mybusiness/ui
Description: A collection of react components.
Author: Hamza Bahlaouane
Latest version: 0.0.13

# Design System

A collection of react components.

## CSS
```jsx
import 'keen-slider/keen-slider.min.css';
import 'react-day-picker/dist/style.css';
```

## Help

- Error: Could not find XX an active match from XX a nearest match!
- Make sure your project `@tanstack/react-router` version is the same as the design system.
npm package: @mycapacitor-plugin/bluetooth
Description: Bluetooth for capacitor
Author: chf
Latest version: 0.0.2

# @mycapacitor-plugin/bluetooth

Bluetooth for capacitor

## Install

```bash
npm install @mycapacitor-plugin/bluetooth
npx cap sync
```

## API

<docgen-index>

* [`echo(...)`](#echo)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### echo(...)

```typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ value: string; }</code> |

**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>

--------------------

</docgen-api>
npm package: @mycapacitor-plugin/file-system
Description: File system
Author: chf
Latest version: 0.0.4

# @mycapacitor-plugin/file-system

File system

## Install

```bash
npm install @mycapacitor-plugin/file-system
npx cap sync
```

## API

<docgen-index>

* [`length(...)`](#length)
* [`delete(...)`](#delete)
* [`download(...)`](#download)
* [`addListener('onProgressChange', ...)`](#addlisteneronprogresschange-)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### length(...)

```typescript
length(path: string) => Promise<{ length: number; }>
```

| Param      | Type                |
| ---------- | ------------------- |
| **`path`** | <code>string</code> |

**Returns:** <code>Promise&lt;{ length: number; }&gt;</code>

--------------------


### delete(...)

```typescript
delete(path: string) => Promise<{ result: boolean; }>
```

| Param      | Type                |
| ---------- | ------------------- |
| **`path`** | <code>string</code> |

**Returns:** <code>Promise&lt;{ result: boolean; }&gt;</code>

--------------------


### download(...)

```typescript
download(url: string, progress: boolean) => Promise<{ downloadFilePath: string; }>
```

| Param          | Type                 |
| -------------- | -------------------- |
| **`url`**      | <code>string</code>  |
| **`progress`** | <code>boolean</code> |

**Returns:** <code>Promise&lt;{ downloadFilePath: string; }&gt;</code>

--------------------


### addListener('onProgressChange', ...)

```typescript
addListener(eventName: 'onProgressChange', listenerFunc: ProgressChangeListener) => Promise<PluginListenerHandle>
```

| Param              | Type                                                                      |
| ------------------ | ------------------------------------------------------------------------- |
| **`eventName`**    | <code>'onProgressChange'</code>                                           |
| **`listenerFunc`** | <code><a href="#progresschangelistener">ProgressChangeListener</a></code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>

--------------------


### Interfaces


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |


#### DownloadProgressInfo

| Prop                | Type                 |
| ------------------- | -------------------- |
| **`currentLength`** | <code>number</code>  |
| **`totalLength`**   | <code>number</code>  |
| **`success`**       | <code>boolean</code> |
| **`finished`**      | <code>boolean</code> |


### Type Aliases


#### ProgressChangeListener

<code>(progress: <a href="#downloadprogressinfo">DownloadProgressInfo</a>): void</code>

</docgen-api>