open-index/open-npm huggingface dataset:
npm package: @pirosikick/md2react
Description: markdown to react element
Author: mizchi
Latest version: 0.8.8-2

# md2react [![Circle CI](https://circleci.com/gh/mizchi/md2react/tree/master.svg?style=svg)](https://circleci.com/gh/mizchi/md2react/tree/master)

```
npm install --save md2react
```

See [md2react playground](http://mizchi.github.io/md2react/ "md2react playground")

## Example

```javascript
global.React = require('react');
var md2react = require('md2react');

var md = '# Hello md2react';
var html = React.renderToString(md2react(md));

/*
<div data-reactid=".14qrwokr3sw" data-react-checksum="20987480"><h1 data-reactid=".14qrwokr3sw.$_start_root_0_heading"><span data-reactid=".14qrwokr3sw.$_start_root_0_heading.0">Hello md2react</span></h1></div>'
//'<div data-reactid=".58nba97pxc" data-react-checksum="-55236619"><h1 data-reactid=".58nba97pxc.0"><span data-reactid=".58nba97pxc.0.0">Hello</span></h1></div>'
*/
```

## Checklist

Compiled elements are given checked/unchecked class if bullet has checkbox.

```javascript
var md = '- [x] a\n- [ ] b\n- c';
var html = React.renderToString(md2react(md, tasklist: true));
```

```html
<div><ul><li class="checked"><p>a</p></li><li class="unchecked"><p>b</p></li><li class=""><p>c</p></li></ul></div>
```

Write your checklist style

## API

- `md2react(markdown: string , mdastOptionsWithSanitize: Object): ReactElement`

See mdast detail in [wooorm/mdast](https://github.com/wooorm/mdast "wooorm/mdast")

And `sanitize: true` uses dompurify to raw html input(examle, `<span onload='alert(1)'></span>`)

## ChangeLog

### v0.5.1

- Support table align

### v0.5.0

- Update mdast to 0.12.0
- Fix table align

## LICENSE

MIT
npm package: @pirosikick/ts-asserts
Description: Assertion Library with TS 3.7 Assertion Funnction
Author: Hiroyuki ANAI
Latest version: 0.0.4
Deprecated: @pirosikick/ts-asserts is deprecated. Please install @cybozu/ts-asserts instead.

# @pirosikick/ts-asserts

[![npm version](https://badge.fury.io/js/%40pirosikick%2Fts-asserts.svg)](https://badge.fury.io/js/%40pirosikick%2Fts-asserts)
[![CI](https://github.com/pirosikick/ts-asserts/workflows/CI/badge.svg)](https://github.com/pirosikick/ts-asserts/actions)
[![codecov](https://codecov.io/gh/pirosikick/ts-asserts/branch/master/graph/badge.svg)](https://codecov.io/gh/pirosikick/ts-asserts)

Assertion Library with [TS 3.7 Assertion Function](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions)

## Motivation

- Wanted an alternative to [goog.asserts](https://google.github.io/closure-library/api/goog.asserts.html) in TypeScript

## Installation

```console
# npm
$ npm install @pirosikick/ts-asserts

# yarn
$ yarn add @pirosikick/ts-asserts
```

## Usage

In bellow example, if `typeof value === number` is true, TypeScript assumes `value` is number type after `assert` is called. If not, `assert` throws `AssertionError`.

```ts
import { assert } from "@pirosikick/ts-asserts";

function unknownToNumber(value: unknown): number {
  assert(typeof value === "number");
  return value;
}
```

If you want to use a custom error message, you can provide the message to 2nd argument of `assert`. `%s` in a custom error message is replaced to 3rd and subsequent arguments.

```ts
assert(type value === 'number', "value isn't number");
assert(type value === 'number', "value isn't %s: %s", "number", String(value));
```

Besides `assert`, `@pirosikick/ts-asserts` has several assertion functions:

- `assertArray(value: unknown, message?: string, ...args: string[])`
- `assertBoolean(value: unknown, message?: string, ...args: string[])`
- `assertNumber(value: unknown, message?: string, ...args: string[])`
- `assertFinite(value: unknown, message?: string, ...args: string[])`
- `assertFunction(value: unknown, message?: string, ...args: string[])`
- `assertExists(value: unknown, message?: string, ...args: string[])`
- `assertInstanceOf(value: unknown, type: T, message?: string, ...string[])`
- `assetObject(value: unknown, message?: string, ...args: string[])`
- `fail(message?: string, ...args: string[])`

### Disable the assertions

To disable the assertions, you can use the `DISABLE_TS_ASSERTS` environment variable.

The below command line is the example which disables the assertions of ts-asserts in Node.js:

```console
$ DISABLE_TS_ASSERT=1 node something.js
```

In webpack, [`DefinePlugin`](https://webpack.js.org/plugins/define-plugin/) is suitable:

```js
new webpack.DefinePlugin({
  DISABLE_TS_ASSERTS: true
});
```

If you want to disable/enable assertion programmatically, you can use `disable()` or `enable()`.

```ts
import { disable, enable } from "@pirosikick/ts-asserts";

disable();

// ...Assertion functions never throw an error.

enable();

// ...Assertion functions throw an error.
```

## License

[MIT](./LICENSE)
npm package: @pirtor/create-draft
Description: cli for manage drafts
Latest version: 0.0.6

# create-draft
> cli for manage drafts, just like @vitejs/app. 

you can just generate demos by template, or genreate a drafts folder first for manage demos with monorepo.

## templates
- **vue**: vue3 tailwindcss scss eslint prettier

## install

```bash
# install
yarn global add @pirtor/create-draft
```

## use

```bash
# global installed
create-draft
# or
demo

# without global installed 
yarn create @pirtor/draft
# or 
npm init @pirtor/draft
```