open-index/open-npm huggingface dataset:
npm package: @pqmcgill/dat-secret-storage
Description: store secret key for dat in home dir
Author: Joe Hand
Latest version: 4.0.2

# dat-secret-storage

Store secret keys for hyperdrive archives in the user's home directory.

[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url]

## Install

```
npm install dat-secret-storage
```

## Usage

Return for the `secret_key` storage in hyperdrive/hypercore. To avoid local ownership conflicts, pass the local directory as the first argument. `dat-secret-storage` will check for a non-empty ownership file in the source directory storage.

```js
var secretStore = require('dat-secret-storage')

var storage = {
  metadata: function (name, opts) {
    if (name === 'secret_key') return secretStore()(path.join(dir, '.dat/metadata.ogd'), opts)
    return // other storage
  },
  content: function (name, opts) {
    return // other storage
  }
}

// store secret key in ~/.dat/secret_keys
var archive = hyperdrive(storage)
```

## API

### `secretStorage([dir])(ownershipFile, opts)`

* `dir`: directory to store keys under `dir/.dat/secret_keys`. Defaults to users home directory.
* `ownershipFile`: non-empty file that denotes ownership. This helps avoid local ownership conflicts of the same dat.

## License

[MIT](LICENSE.md)

[npm-image]: https://img.shields.io/npm/v/dat-secret-storage.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/dat-secret-storage
[travis-image]: https://img.shields.io/travis/joehand/dat-secret-storage.svg?style=flat-square
[travis-url]: https://travis-ci.org/joehand/dat-secret-storage
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard
npm package: @pqmcgill/dat-storage
Description: Dat specific storage provider for Hyperdrive
Author: Mathias Buus
Latest version: 1.1.5

# dat-storage

Dat specific storage provider for [Hyperdrive](https://github.com/mafintosh/hyperdrive)

```
npm install dat-storage
```

## Usage

``` js
var storage = require('dat-storage')

// files are stored in ./my-dataset
// metadata (hashes and stuff) are stored in ./my-dataset/.dat
// secret keys are stored in ~/.dat/secret_keys/<discovery-key>
var archive = hyperdrive(storage('my-dataset'))
```

### Custom storage provider

You can require this module in your own storage provider in order to override certain behaviors for some files while still using the default dat storage methods for other files. Here's an example of overriding only the secret key storage and nothing else:

```js
const defaultStorage = require('dat-storage')
const alternativeSecretStorage = require('your-own-custom-random-access-file-module')

module.exports = function keychainStorage() {
  const storage = defaultStorage(...arguments)
  return {
    metadata: function(file, opts) {
      if (file === 'secret_key') alternativeSecretStorage(file)
      return storage.metadata(...arguments)
    },
    content: function(file, opts) {
      return storage.content(...arguments)
    }
  }
}
```

### Options

- `secretDir` - folder to store secret keys in (default is users home dir)
- `prefix` - subfolder to put dat SLEEP files in (default is `.dat/`)

### Secret Keys

By default secret keys are stored in the users home directory via [dat-secret-storage](https://github.com/joehand/dat-secret-storage). To change the directory, pass it as an option:

```js
var storage = require('dat-storage')

var archive = hyperdrive(storage('my-dataset', {secretDir: '/secret_keys'})
```

## License

MIT
npm package: @pqmcgill/group
Description: vx group
Author: @hshoff
Latest version: 0.0.161

# @vx/group

```
npm install --save @vx/group
```

A Group is a container for other objects. It lets you pass in a top and left margin and a classname.

Example usage:

```js
import { Group } from '@vx/group';
const myGroup = (
  <Group top={50} left={20}>
    /* Children here */
  </Group>
)
```

## Properties

|   Name    | Default |  Type  |                     Description                     |
|:--------- |:------- |:------ |:--------------------------------------------------- |
| top       | 0       | number | Margin on top                                       |
| left      | 0       | number | Margin on left                                      |
| className |         | string | The class name associated with the svg `g` element. |

## Source For Components
+ [`<Group />`](https://github.com/hshoff/vx/blob/master/packages/vx-group/src/index.js)
npm package: @pqmcgill/point
Description: vx point
Author: @hshoff
Latest version: 0.0.161

# @vx/point

```
npm install --save @vx/point
```

A simple class to represent an x, y coordinate.

## Example Usage

```js
import { Point } from '@vx/point';

let point  = new Point({ x: 2, y: 3 });
let {x, y} = point.value()   // Get the cords from the point
let array  = point.toArray() // Convert point to array
```

## Methods

### `point.value()`

Returns an `{x, y}` object with the x and y coordinates.

### `point.toArray()`

Returns the coordinates as an array `[x, y]`.
npm package: @pqmcgill/random-access-file
Description: Continuous reading or writing to a file using random offsets and lengths
Author: Mathias Buus
Latest version: 2.1.3

# random-access-file

Continuous reading or writing to a file using random offsets and lengths

```
npm install random-access-file
```

[![build status](https://travis-ci.org/random-access-storage/random-access-file.svg?branch=master)](https://travis-ci.org/random-access-storage/random-access-file)

## Why?

If you are receiving a file in multiple pieces in a distributed system it can be useful to write these pieces to disk one by one in various places throughout the file without having to open and close a file descriptor all the time.

random-access-file allows you to do just this.

## Usage

``` js
var randomAccessFile = require('random-access-file')

var file = randomAccessFile('my-file.txt')

file.write(10, Buffer.from('hello'), function(err) {
  // write a buffer to offset 10
  file.read(10, 5, function(err, buffer) {
    console.log(buffer) // read 5 bytes from offset 10
    file.close(function() {
      console.log('file is closed')
    })
  })
})
```

file will use an open file descriptor. When you are done with the file you should call `file.close()`.

## API

#### `var file = randomAccessFile(filename, [options])`

Create a new file. Options include:

``` js
{
  truncate: false, // truncate the file before reading / writing
  size: someSize, // truncate the file to this size first
  readable: true, // should the file be opened as readable?
  writable: true,  // should the file be opened as writable?
  lock (fd) => bool // optional function that informs if the file could be locked
}
```

#### `file.write(offset, buffer, [callback])`

Write a buffer at a specific offset.

#### `file.read(offset, length, callback)`

Read a buffer at a specific offset. Callback is called with the buffer read.

#### `file.del(offset, length, callback)`

Will truncate the file if offset + length is larger than the current file length.
Is otherwise a noop.

#### `file.stat(callback)`

Stat the storage. Should return an object with useful information about the underlying storage, including:

```js
{
  size: number // how many bytes of data is stored?
}
```

#### `file.close([callback])`

Close the underlying file descriptor.

#### `file.destroy([callback])`

Unlink the underlying file.

#### `file.on('open')`

Emitted when the file descriptor has been opened. You can access the fd using `file.fd`.
You do not need to wait for this event before doing any reads/writes.

#### `file.on('close')`

Emitted when the file has been closed.

## License

MIT
npm package: @pqmcgill/wallpaper
Description: Manage the desktop wallpaper
Author: Sindre Sorhus
Latest version: 4.4.1

# wallpaper [![Build Status](https://travis-ci.org/sindresorhus/wallpaper.svg?branch=master)](https://travis-ci.org/sindresorhus/wallpaper) [![Build status](https://ci.appveyor.com/api/projects/status/xhwaihmhhplh5d05/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/wallpaper/branch/master)

> Get or set the desktop wallpaper

Works on macOS 10.12+, Linux, and Windows 10+.

*Maintainer needed for the Linux part of the code. No new Linux-related changes will be accepted until someone with good Linux knowledge volunteers.*


## Install

```
$ npm install wallpaper
```


## Usage

```js
const wallpaper = require('wallpaper');

(async () => {
	await wallpaper.set('unicorn.jpg');

	await wallpaper.get();
	//=> '/Users/sindresorhus/unicorn.jpg'
})();
```


## API

### .get(options?)

Returns a `Promise<string>` with the path of the current desktop wallpaper.

#### options

Type: `object`

##### screen *(macOS only)*

Type: `string | number`<br>
Values: `'all'`, `'main'`, or the index of a screen from `.screens()`<br>
Default: `'main'`

The screen to get the wallpaper from.

If you set `'all'` then `.get()` will return a `Promise<string[]>`.

### .set(imagePath, options?)

Returns a `Promise`.

#### imagePath

Type: `string`

The path to the image to set as the desktop wallpaper.

#### options

Type: `object`

##### screen *(macOS only)*

Type: `string | number`<br>
Values: `'all'`, `'main'`, or the index of a screen from `.screens()`
Default: `'all'`

The screen to set the wallpaper on.

*On Linux and Windows it's hard-coded to `'main'`.*

##### scale *(macOS only)*

Type: `string`<br>
Values: `'auto' | 'fill' | 'fit' | 'stretch' | 'center'`<br>
Default: `'auto'`

Scaling method.

### .screens() *(macOS only)*

Returns a `Promise<string[]>` with the available screens.

```js
(async () => {
	await wallpaper.screens();
	//=> ['Color LCD']
})();
```


## Related

- [wallpaper-cli](https://github.com/sindresorhus/wallpaper-cli) - CLI for this module
- [macos-wallpaper](https://github.com/sindresorhus/macos-wallpaper) - macOS binary used in this module
- [win-wallpaper](https://github.com/sindresorhus/win-wallpaper) - Windows binary used in this module
- [trash](https://github.com/sindresorhus/trash) - Move files and directories to the trash
npm package: @pqrn/svg-icon-cli
Description: 本工具是基于[react-native-iconfont-cli](https://github.com/iconfont-cli/react-native-iconfont-cli)的基础上修改而来。因为 UI 设计师使用`Figma`产出设计稿，所以项目中用到的图标不会使用 iconfont 或者图片，而是直接导出 svg 格式。 借助这个工具，就可以很方便地把本地 svg 转成图标组件在项目中使用。为此，精简了原项目中很多不需要的功能（比如拉取 iconfont 图标库、支持导出 js 文件等），以
Author: 范文华
Latest version: 1.0.2

## @td-design/svg-icon-cli

本工具是基于[react-native-iconfont-cli](https://github.com/iconfont-cli/react-native-iconfont-cli)的基础上修改而来。因为 UI 设计师使用`Figma`产出设计稿，所以项目中用到的图标不会使用 iconfont 或者图片，而是直接导出 svg 格式。
借助这个工具，就可以很方便地把本地 svg 转成图标组件在项目中使用。为此，精简了原项目中很多不需要的功能（比如拉取 iconfont 图标库、支持导出 js 文件等），以满足我们自己的需求。

## 特性

1、纯组件，不依赖字体，体积小
<br />
2、支持渲染多色彩图标，支持自定义颜色
<br />
3、支持热更新
<br />
4、自动化生成图标组件，默认支持 typescript

## Step 1

安装插件

```bash
# Yarn
yarn add react-native-svg
yarn add @td-design/svg-icon-cli --dev

# Npm
npm install react-native-svg
npm install @td-design/svg-icon-cli --save-dev
```

# Step 2

生成配置文件

```bash
npx svgicon-init
```

此时项目根目录会生成一个`svgicon.json`的文件，内容如下：

```json
{
  "save_dir": "", // 生成图标文件的保存位置，推荐 ./src/components/iconfont
  "trim_icon_prefix": "icon", // 图标文件的统一前缀
  "default_icon_size": 20, // 图标文件的默认大小
  "icon_svg": "./icon-svg", // 图标文件的存放位置
  "for_library": false // 是否为组件库生成图标，默认是false，表示是为项目生成图标
}
```

# Step 3

开始生成 React-Native 标准组件

```bash
npx svgicon-rn
```

# 使用

```typescript jsx
import { SvgIcon } from "components";

export const App = () => {
  return (
    <View>
      <SvgIcon name="alipay" size={20} />
      <SvgIcon name="wechat" />
    </View>
  );
};
```

### 图标尺寸

根据配置`default_icon_size`，每个图标都会有一个默认的尺寸，你可以随时覆盖。

```typescript jsx
<SvgIcon name="alipay" size={20} />
```

### 图标单色

单色图标，如果不指定颜色值，图标将渲染原本的颜色。如果你想设置为其他的颜色，那么设置一个你想要的颜色即可。

**注意：如果你在 props 传入的 color 是字符串而不是数组，那么即使原本是多色彩的图标，也会变成单色图标。**

```typescript jsx
<SvgIcon name="alipay" color="green" />
```

![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/one-color-icon.png?raw=true)

### 图标多色彩

多色彩的图标，如果不指定颜色值，图标将渲染原本的多色彩。如果你想设置为其他的颜色，那么设置一组你想要的颜色即可

```typescript jsx
<IconFont name="alipay" color={["green", "orange"]} />
```

颜色组的数量以及排序，需要根据当前图标的信息来确定。您需要进入图标组件中查看并得出结论。

![](https://github.com/fwh1990/react-native-iconfont-cli/blob/master/images/multi-color-icon.png?raw=true)

# 更新图标

当`icon_svg`文件夹下的 svg 文件发生变化时，只需要重新执行下面的命令即可生成最新的图标组件

```bash
npx svgicon-rn
```
npm package: @pqrux/simple-pix
Description: Simple and lightweight package for generating PIX BR Codes and QR Codes.
Author: PQrux
Latest version: 1.0.3

# simple-pix

The simplest way to generate your pix QR Codes!

1. Install
```
npm i @pqrux/simple-pix
```

2. Import
```typescript
import MakePIX from '@pqrux/simple-pix';
```
3. Generate!
```typescript
MakePIX({
    pixKey: 'your pix key',
    merchantName: 'your full name',
    merchantCity: 'your city',
    uniquePayment: false, //optional
    categoryCode: '0000' //optional
    currencyCode: '999' //optional
    value: 30.4, //optional
    countryCode: 'BR' //optional
    postalCode: '06624444', //optional
    txID: '***' //optional
}, {
    generateBase64: true //optional
})
.then(({
    brCode, //string
    base64QRCode //string?
}) => {
...
})
```
npm package: @pqstudio/pq_events
Description: pq_events 
Author: pqstudio
Latest version: 2.0.30

# `pq_events`

> 事件实现

## Usage

> 使用装饰器方式

```
@PQEventSubscriber
class EventBus implements PQIEventDispatcher {
    //#region 实现PQIEventDispatcher
    public on!: <T, U>(type: string, handler: CallBackHandler<T>, caller: U, priority?: number, once?: number) => void;
    public off!: <T, U>(type: string, handler: CallBackHandler<T>, caller: U) => void;
    public emit!: <U>(type: string, data: U) => void;
    public dispatch!: <U>(type: string, data: U) => void;
    //#endregion 实现PQIEventDispatcher

    @addPQEventListener("message")
    public onMessage(event: PQEvent<unknown>): void {
        expect(event.data).toBe(1);
    }

    @addPQEventListener(new A())
    public onMesssage1(event: PQEvent<number>): void {
        expect(event.data).toBe(1);
        expect((<A><unknown>expect(event.source)).a).toBe(1);
    }

    @addPQEventListener(ia)
    public onMesssage2(event: PQEvent<number>): void {
        expect(event.data).toBe(1);
        expect((<A><unknown>expect(event.source)).a).toBe(2);
    }
}
```

> 使用继承方式

```
class EventBus1 extends PQEventDispatcher() implements PQIEventDispatcher {
    //#region 实现PQIEventDispatcher
    public on!: <T, U>(type: string, handler: CallBackHandler<T>, caller: U, priority?: number, once?: number) => void;
    public off!: <T, U>(type: string, handler: CallBackHandler<T>, caller: U) => void;
    public emit!: <U>(type: string, data: U) => void;
    public dispatch!: <U>(type: string, data: U) => void;
    //#endregion 实现PQIEventDispatcher

    @addPQEventListener("message")
    public onMessage(event: PQEvent<unknown>): void {
        expect(event.data).toBe(1);
    }
}
```