open-index/open-npm huggingface dataset:
npm package: @hirishh/lisk-ledger.js
Description: This library eases the interaction with the corresponding ledger nano implementation
Author: hirish
Latest version: 2.2.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Lisk Ledger API

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

This library is meant to be used with the corresponding Ledger C implementation. Given the end-user have:

- His ledger connected & unlocked;
- the corresponding app open;

This JS library will serve as an interface between your code and the hardware wallet handling the communication protocol.

## Documentation

Documention is available [here](https://hirishh.github.io/lisk-ledger-api/index.html).

## Environment Support

This library does not make any assumption on the environment on which it is being consumed.

Both Node.JS and minified Browser version of this library are provided.

### NodeJS

To consume this library through an app running under the NodeVM, you'll need to use the [@ledgerhq/hw-transport-node-hid](https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-transport-node-hid) transport.

This library, and the ledger app, have been developed and tested with `hw-transport-node-hid@6.2.0`.

### Browser

The Browser version currently weights `32KB` (non gzipped). It can be used both via webpack or directly including it in your page just like any other script.

This library, and the ledger app, have been tested with `@ledgerhq/hw-transport-node-hid@6.2.0` as Transport.

## Platform Indipendent Example

```typescript
import TransportWebUsb from '@ledgerhq/hw-transport-webusb';
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
import { isBrowser, isNode } from 'browser-or-node';
import { LiskLedger } from '@hirishh/lisk-ledger.js';

let transportMethod;
if (isBrowser) {
  transportMethod = TransportWebUsb;
} else if (isNode) {
  transportMethod = TransportNodeHid;
} else {
  // ??
}

transportMethod.create()
  .then((transport) => new LiskLedger(transport));
  .then((instance) => {
    // ..
  });

// Or by using async/await
let transport = TransportNodeHid.create();
let instance = new LiskLedger(transport);
let account = new LedgerAccount();
const res = await instance.getPubKey(account);

```

## Thanks

Any improvement/suggestion is very welcome.
npm package: @hirishu10/simple-date-time
Description: Simple and very helpful package to get the Date Time functionality
Author: Rishu Chowdhary
Latest version: 2.0.0

# @hirishu10/simple-date-time

> Read the Official Documentation at → [https://simpledt.netlify.app/](https://simpledt.netlify.app/)

## Changelog v.2.0.0

- Major changes for version **v.2.0.0**
- Two new **Function/Hooks** added:
  - `getCustomMonth();`
  - `getCustomYear();`
- ## Some flag has been added, deprecated and modified. [#ref](https://simpledt.netlify.app/docs/intro#method-and-props-configuration)
- Custom function/hook **`getCustomDTFormatter().format();`** introduced for better formatting.
  - `getCustomDTFormatter(dateValue?)` - If you want to use the old date please provide an unix value inside the dateValue.
  - `format(formatValue, insertCharacters?)`
    - You have to pass `formatValue` ([Please read the Method and Props Config](https://simpledt.netlify.app/docs/intro#method-and-props-configuration)), Note: **\*add** space after each char.
    - `insertCharacters` is totally optional, if you need to provide a character at the end of each **_formatValue_** character, you can add it.
npm package: @hiro-ui/eslint-config
Description: ESLint Configuration
Latest version: 2.0.1

# ESLint Configuration

## Usage

First, install this package, ESLint and the necessary plugins.

```sh
yarn add -D @hiro-ui/eslint-config
```

Then create a file named `.eslintrc.json` with following contents in the root folder of your project:

```json
{
  "extends": "@hiro-ui"
}
```
npm package: @hiro-ui/husky-config
Description: Husky Configuration with built in lint-staging
Latest version: 2.1.1

# Husky Configuration

## Usage

**Install**:

```bash
yarn add --dev husky @hiro-ui/husky-config
```

**Create `.huskyrc.js`**:

```js
module.exports = require('@hiro-ui/husky-config');
```
npm package: @hiro-ui/react-scripts
Description: It's react-scripts@5.0.1 but with our own tweaks.
Latest version: 4.1.0

# @hiro-ui/react-scripts

It's react-scripts@5.0.1 but with our own tweaks.

### Notable changes

- Node 20
- SASS is supported out of the box (no need to install the `node-sass` package)
- ESLint is disabled, because we run it with our own config through husky
- Code splitting is managed by CHUNKS_GENERATION flag (process.env.CHUNKS_GENERATION === 'true';)
- Disabled CRA REACT*APP* prefix for .env variables' names
- used old format of manifest file

### Additional to CRA flags

--desktop | hiro-desktop config added for start and build command (multiple entrypoints, NODE_TLS_REJECT_UNAUTHORIZED and HIRO_VERSION in process.env)

### Additional to CRA .env configuration parameters

| Variable          | Development | Production | Notes                                                                                                              |
| ----------------- | ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------ |
| CHUNKS_GENERATION | -           | +          | When set to `true`, chunks are generated for a production build. Available only for desktop apps, not for desktop. |
npm package: @hiro-ui/sdk-cli
Description: HIRO applications generator.
Latest version: 8.3.12

# HIRO SDK CLI

CLI utils for HIRO applications.

## Project setup

#### Prerequisites

- node 16+
- yarn 1.22+

#### Instalation

- Run `yarn global add @hiro-ui/sdk-cli`

## Commands
 
### hiro-sdk bundle

Bundles compiled application into a zip archive.

We need to build our app first.
Run `yarn build` to create a production build.

As result, we expect a `build` folder in project root.
It should have the following structure:

```
build
├── asset-manifest.json
├── icon.svg
├── index.html
└── static
    ├── css
    │   └── main.2c2ee846.css
    └── js
        └── main.fb659025.js
```

**Important files**

`icon.svg` is used by HIRO Desktop as the icon of the application.

`asset-manifest.json` contains paths mapping for your assets.
`main.js` is **required**. Example `asset-manifest.json` contents:

```
{
  "main.css": "static/css/main.2c2ee846.css",
  "main.js": "static/js/main.fb659025.js"
}
```

HIRO Desktop loads `main.js` and all `.css` files found in manifest.

After we've made a production build, we need to bundle the app.  
`hiro-sdk bundle` command creates a `bundle.zip` archive in the project root.

### hiro-sdk publish

Publishes bundled application (`bundle.zip`) to the graph.

You can provide either host/token/parent combination to command or read those values from env files.

Using explicit arguments:

- `-h` = Graph URL
- `-t` = Graph token
- `-p` = Desktop "ui" app ID on your installation

Using implicit arguments: just pass `-e` flag to read arguments from .env files

- `HIRO_GRAPH_URL` = Graph URL
- `HIRO_GRAPH_TOKEN` = Graph token
- `HIRO_DESKTOP_ID` = Desktop "ui" app ID on your installation

```
# Explicit arguments
hiro-sdk publish -h https://acme.graphit.co -t vm8127v89126cn8712616c12c12 -p awv8a57wavmawvawawvaw

# Implicit arguments
hiro-sdk publish -e
```

As result, your application will be either created or updated, depending on `name` field in the `manifest.yaml`.
NOTE, that you can only update applications uploaded by you.

Use `hiro-sdk --help` to get more info
npm package: @hiro0218/accordion.js
Description: Accordion Menu Library
Author: hiro
Latest version: 0.1.3

# @hiro0218/accordion.js

## install

```
npm install -D @hiro0218/accordion.js
```

## usage

### HTML

Opening and closing moves independently.

```html
<div data-accordion>
  <h2 data-accordion-header aria-expanded="false">TITLE</h2>
  <div data-accordion-container>
    CONTENTS
  </div>
</div>
```

---

Opening and closing interlocks.

```html
<div data-accordion="alone">
  <h2 data-accordion-header aria-expanded="false">TITLE</h2>
  <div data-accordion-container>
    CONTENTS
  </div>
</div>
```

### CSS

```scss
[data-accordion] {
  [data-accordion-header] {
    cursor: pointer;
    user-select: none;
  }
  
  [data-accordion-container] {
    overflow-y: hidden;
    max-height: 0;
    transition: max-height 0.6s ease;
  }

  // close
  [aria-expanded="false"] {}

  // open
  [aria-expanded="true"] {
    & ~ [data-accordion-container] {
      max-height: 200vh;
    }
  }
}
```

### JS

```js
import Accordion from '@hiro0218/accordion.js';
new Accordion();
```
npm package: @hiro0218/eslint-config
Description: hiro's eslint config
Author: hiro0218
Latest version: 1.3.0

# hiro0218/eslint-config

```
npm i -D @hiro0218/eslint-config
```

```js
// .eslintrc.js

module.exports = {
  extends: "@hiro0218/eslint-config"
}
```
npm package: @hiro0218/postcss-config
Description: hiro's postcss config
Author: hiro0218
Latest version: 1.1.0

# @hiro0218/postcss-config

```
npm i -D @hiro0218/postcss-config
```

```js
// postcss.config.js

module.exports = {
  plugins: {
    '@hiro0218/postcss-config',
  },
};
```
npm package: @hiro0218/prettier-config
Description: hiro's prettier config
Author: hiro0218
Latest version: 1.0.2

# @hiro0218/prettier-config

```
npm i -D @hiro0218/prettier-config
```

```json5
# .prettierrc.json
"@hiro0218/prettier-config"
```

or

```js
module.exports = {
  ...require('@hiro0218/prettier-config'),
  semi: false
};
```
npm package: @hiro0218/stylelint-config
Description: hiro's stylelint config
Author: hiro0218
Latest version: 1.2.0

# @hiro0218/stylelint-config

```
npm i -D @hiro0218/stylelint-config
```

## .stylelintrc.js

```js
module.exports = {
  "extends": ["@hiro0218/stylelint-config"],
  "rules": {
    // Add override rules
  },
};
```
npm package: @hiroga/mynewcli
Description: @hiroga/mynewcli ================
Author: Hiroaki Ogasawara @hiroga-cc
Latest version: 0.1.2

@hiroga/mynewcli
================



[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@hiroga/mynewcli.svg)](https://npmjs.org/package/@hiroga/mynewcli)
[![Downloads/week](https://img.shields.io/npm/dw/@hiroga/mynewcli.svg)](https://npmjs.org/package/@hiroga/mynewcli)
[![License](https://img.shields.io/npm/l/@hiroga/mynewcli.svg)](https://github.com/hiroga-cc/mynewcli/blob/master/package.json)

<!-- toc -->
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->
# Usage
<!-- usage -->
```sh-session
$ npm install -g @hiroga/mynewcli
$ mynewcli COMMAND
running command...
$ mynewcli (-v|--version|version)
@hiroga/mynewcli/0.1.2 darwin-x64 node-v10.5.0
$ mynewcli --help [COMMAND]
USAGE
  $ mynewcli COMMAND
...
```
<!-- usagestop -->
# Commands
<!-- commands -->
* [`mynewcli goodbye [FILE]`](#mynewcli-goodbye-file)
* [`mynewcli hello [FILE]`](#mynewcli-hello-file)
* [`mynewcli help [COMMAND]`](#mynewcli-help-command)

## `mynewcli goodbye [FILE]`

describe the command here

```
USAGE
  $ mynewcli goodbye [FILE]

OPTIONS
  -f, --force
  -h, --help               show CLI help
  -u, --userpool=userpool  name to print
```

_See code: [src/commands/goodbye.ts](https://github.com/hiroga-cc/mynewcli/blob/v0.1.2/src/commands/goodbye.ts)_

## `mynewcli hello [FILE]`

describe the command here

```
USAGE
  $ mynewcli hello [FILE]

OPTIONS
  -f, --force
  -h, --help       show CLI help
  -n, --name=name  name to print

EXAMPLE
  $ mynewcli hello
  hello world from ./src/hello.ts!
```

_See code: [src/commands/hello.ts](https://github.com/hiroga-cc/mynewcli/blob/v0.1.2/src/commands/hello.ts)_

## `mynewcli help [COMMAND]`

display help for mynewcli

```
USAGE
  $ mynewcli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.1.6/src/commands/help.ts)_
<!-- commandsstop -->
npm package: @hirohe/fetch-request
Description: wrapper of isomorphic-fetch
Author: hirohe
Latest version: 0.0.1-alpha4
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

fetch-request
=============

a wrapper of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch)

make it more like 'axios'

⚠️⚠️⚠️ still work in progress ⚠️⚠️⚠️

### install

```bash
npm install --save @hirohe/fetch-request
```

### usage

#### example
```js
import FetchRequest from '@hirohe/fetch-request'

const options = {
  baseUrl: '/api',
  headers: { 'content-type': 'application/json' },
};
// make new instance with options
const request = new FetchRequest(options);

// setup response interceptor
request.setupResponseInterceptor(response => {
  // do something
}, error => {
  // handle with error
});

// GET /api/test?q=hello&_t=1532915637137
// will add timestamp param '_t' by default
request.get('/test', { params: { q: 'hello' } });
```

### request options

request options use to initialze FetchRequest, extend from [RequestInit](https://fetch.spec.whatwg.org/#request-class)

`const request = new FetchRequest(options);`

```js
export interface RequestOptions extends RequestInit {
  baseUrl?: string;
  data?: object;
  params?: object;
  responseType?: 'json' | 'blob' | 'formData' | 'arrayBuffer' | 'text' | string;
  withTimestamp?: boolean;
}
```

- baseUrl: prepended to `url`.
- data: the request body data, it should be plain object for now...
- params: will add to request query string, should be plain object.
- responseType: decide witch type of response is, can be 'json', 'blob', 'formData', 'arrayBuffer', 'text'. is 'json' by default
- withTimestamp: weather append timestamp param to query string, e.g: `_t=1532915637137`. it makes each request unique, prevent getting cache from server, is `true` by default

### request methods

request.get(url\[, options\])

request.delete(url\[, options\])

request.head(url\[, options\])

request.options(url\[, options\])

request.post(url\[, data\[, options\]\])

request.put(url\[, data\[, options\]\])

request.patch(url\[, data\[, options\]\])


... //WIP
npm package: @hirohe/hooks-util
Description: custom hooks
Author: hirohe
Latest version: 0.2.3

# hooks-util
some custom react hooks

[![](https://flat.badgen.net/npm/v/@hirohe/hooks-util?icon=npm)](https://www.npmjs.com/package/@hirohe/hooks-util)

### Usage

### Document

- useFetch

包装网络请求函数的钩子，返回请求调用方法、请求的返回数据、是否正在请求的状态

```tsx
// 请求远程数据的方法
function fetchData(): Promise<string> {
  // ... http request
}

const App = () => {
  // loadData 包装后的请求方法，参数和返回值跟fetchData一致
  // data 和useState返回的state一样，为fetchData返回的异步数据
  // loadingData 是否正在请求数据的状态
  const [loadData, data, loadingData] = useFetch(fetchData, 'initialData');

  return (
    <div>
      <button onClick={loadData}>Load data</button>
      {loadingData && <p>loading...</p>}
      <p>data: {data}</p>
    </div>
  );
}
```

---

- useDebounceState

封装了`lodash/debounce`方法的钩子

```tsx
const App = () => {
  const [count, setCount] = useDebounce(0, 1000)

  return (
    <div>
      <p>{count}</p>
      <button>count +1</button>
    </div>
  )

}
```
npm package: @hirojs/dom-bind
Description: DOM event binding and delegation
Author: Jason Frame
Latest version: 1.0.0

# dom-bind

DOM event binding and delegation.

## Installation

Browserify recommended.

	$ npm install dom-bind

In the codes:

	var E = require('dom-bind');

## API

### Events

#### `E.bind(el, evtType, cb, [useCapture])`

#### `E.bind_c(el, evtType, cb, [useCapture])`

As above, but returns a cancellation function.

#### `E.delegate(el, evtType, selector, cb, [useCapture])`

#### `E.delegate_c(el, evtType, selector, cb, [useCapture])`

As above, but returns a cancellation function.

#### `E.unbind(el, evtType, cb, [useCapture])`