open-index/open-npm huggingface dataset:
npm package: @mizchi/match
Description: Typed switch case for flowtype.
Latest version: 1.0.4

# Match

Typed switch case for flowtype.

## How to use

```sh
npm install @mizchi/match -S
# or
yarn add @mizchi/match
```

This includes index.js.flow to give type definition to flow.

## API

- `match<T, U>(value: T): Match<T, U>`
- Matcher
  - `.case(v: T): Match<T, U>`
  - `.if(func: (t: T) => boolean): Match<T, U>`
  - `.instanceof(klass: typeof Object): Match<T, U>`
- `.then(next: () => U)`
- `.end(): ?U`
- `.default(next: () => U): U`

You should finish by `.end` or `.default`.

## Example

```js
import match from "@mizchi/match";
const v1: string = match(~~(Math.random() * 10))
  .is(0).then(() => "zero")
  .case(i => i > 5).then(() => "over 5")
  .dafault(() => "others");

const v2: ?string = match(~~(Math.random() * 2))
  .is(0).then(() => "zero")
  .end();
```

## license

MIT
npm package: @mizchi/mdast-util-to-hast
Description: Transform MDAST to HAST
Author: Titus Wormer
Latest version: 1.0.0-p4

# mdast-util-to-hast [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

<!--lint disable heading-increment list-item-spacing-->

Transform [MDAST][] to [HAST][].

## Installation

[npm][npm-install]:

```bash
npm install mdast-util-to-hast
```

## Usage

Dependencies:

```javascript
var inspect = require('unist-util-inspect');
var remark = require('remark');
var toHAST = require('@mizchi/mdast-util-to-hast');
```

Transform:

```javascript
var hast = toHAST(remark().parse('## Hello **World**!'));
```

Yields:

```txt
root[1] (1:1-1:20, 0-19)
└─ element[3] (1:1-1:20, 0-19) [tagName="h2"]
   ├─ text: "Hello " (1:4-1:10, 3-9)
   ├─ element[1] (1:10-1:19, 9-18) [tagName="strong"]
   │  └─ text: "World" (1:12-1:17, 11-16)
   └─ text: "!" (1:19-1:20, 18-19)
```

## API

### `toHAST(node[, options])`

Transform the given [MDAST][] tree to a [HAST][] tree.

###### `options.allowDangerousHTML`

Whether to allow `html` nodes and inject them as raw HTML (`boolean`,
default: `false`). Only do this when compiling later with
`hast-util-to-html`.

###### Returns

[`HASTNode`][hast].

###### Note

*   [`yaml`][mdast-yaml] and [`html`][mdast-html] nodes are ignored;
*   [`position`][unist-position]s are properly patched;
*   Unknown nodes with `children` are transformed to `div` elements;
*   Unknown nodes with `value` are transformed to `text` nodes;
*   If `node.data.hName` is set, it’s used as the HAST element’s tag-name;
*   If `node.data.hProperties` is set, it’s mixed into the HAST element’s
    properties;
*   If `node.data.hChildren` is set, it’s used as the element’s HAST
    children;

## Related

*   [`hast-util-sanitize`][hast-util-sanitize]

## License

[MIT][license] © [Titus Wormer][author]

<!-- Definitions -->

[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-to-hast.svg

[travis]: https://travis-ci.org/wooorm/mdast-util-to-hast

[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-to-hast.svg

[codecov]: https://codecov.io/github/wooorm/mdast-util-to-hast

[npm-install]: https://docs.npmjs.com/cli/install

[license]: LICENSE

[author]: http://wooorm.com

[mdast]: https://github.com/wooorm/mdast

[hast]: https://github.com/wooorm/hast

[mdast-yaml]: https://github.com/wooorm/mdast#yaml

[mdast-html]: https://github.com/wooorm/mdast#html

[unist-position]: https://github.com/wooorm/unist#location

[hast-util-sanitize]: https://github.com/wooorm/hast-util-sanitize
npm package: @mizchi/mdbuf
Description: Markdown Edit & Preview
Latest version: 0.0.5

# mdbuf

Markdown Edit & Preview

Try here https://markdown-buffer.netlify.com/

## Features

- Off thread markdown compiling
- Desktop PWA
- Migrate prettier (Meta+S)
- Auto scroll to editing element

## How to dev

- `yarn dev`: Start asset server on `http://localhost:7777`
- `yarn build`: Generate SPA to `dist`

## How to deploy

Need netlify account httsp://www.netlify.com

```
yarn deploy
```

## TODO

- Editor Select (Monaco, CodeMirror)
- MDX
- Search
- Input with speech

## LICENSE

MIT
npm package: @mizchi/memorystorage
Description: Node.js localstorage for KVS.
Author: azu
Latest version: 1.1.0

# @kvs/memorystorage

In-Memory storage for [KVS](https://github.com/azu/kvs).

:memo: It is not persisted storage.

## Dependencies

- [localstorage-memory](https://github.com/gr2m/localstorage-memory)

## Install

Install with [npm](https://www.npmjs.com/):

    npm install @kvs/memorystorage

## Usage

See <https://github.com/azu/kvs#usage>

## Changelog

See [Releases page](https://github.com/azu/kvs/releases).

## Running tests

Install devDependencies and Run `npm test`:

    npm test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/azu/kvs/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)

## License

MIT © azu
npm package: @mizchi/mints
Description: minimum typescript compiler (7.6kb, gzip)
Latest version: 0.2.1

# mints

minimum typescript compiler (7.6kb, gzip)

Demo https://mints-playground.netlify.app/

## Goal

- Lightweight
- Just drop type annotations like `:number` and transform `enum`, `constructor`'s `public/private/proctected` and `jsx`.
- Fast first compile (use prebuild binary format)
- Support parallel compile

## Syntax Limitations

- All statements except those terminated by `}` require `;` (expect prettier format)
- mints tokenizer is unstable for RegExp Literal `/.../` yet.
  - `/ ` can not parse as RexExp (expect binary divider). use `/[ ]...`.
  - `/>` can not parse as RegExp (expect jsx)
  - `</` can not parse as RegExp (expect jsx)
- Not Support
  - `with`
  - `namespace`
  - `decorator`

## How to use

```
npm install @mizchi/mints --save
yarn add @mizchi/mints
```

```ts
import { transformSync } from "@mizchi/mints";
const out = transformSync(`const x: number = 1;`);

if (!out.error) {
  console.log(out); // parse error object
} else {
  console.log(out.code); // result
}
```

TODO: add worker mode example

## Run with cache

```ts
import { transformSync } from "@mizchi/mints";
const cache = new Map();
const out1 = transformSync(`const x: number = 1;const y = 2;`, { cache });

const out2 = transformSync(`const x: number = 1; const y = 3;`, { cache });

cache.clear();
```

`transformSync` caches result by each line. In this case, compile only `const y = 3;` line.

## Benchmark

```
$ yarn bench
```

```
--------- 2416chars
[tsc] 58ms
[esbuild] 14ms
[mints] 6ms
[mints_para] 12ms
--------- 2981chars
[tsc] 14ms
[esbuild] 1ms
[mints] 9ms
[mints_para] 12ms
--------- 5118chars
[tsc] 18ms
[esbuild] 1ms
[mints] 12ms
[mints_para] 22ms
--------- 21153chars
[tsc] 55ms
[esbuild] 3ms
[mints] 59ms
[mints_para] 53ms
--------- 18584chars
[tsc] 39ms
[esbuild] 2ms
[mints] 39ms
[mints_para] 32ms
--------- 3844chars
[tsc] 12ms
[esbuild] 1ms
[mints] 9ms
[mints_para] 17ms
--------- 38611chars
[tsc] 72ms
[esbuild] 3ms
[mints] 57ms
[mints_para] 45ms
--------- 6935chars
[tsc] 13ms
[esbuild] 1ms
[mints] 13ms
[mints_para] 7ms
```

---

## How to develop

```bash
# git clone ...
yarn install

cd packages/mints
yarn build
yarn test
yarn bench
yarn test262 # not pass yet
```

## LICENSE

MIT