open-index/open-npm huggingface dataset:
npm package: @ricann/html2vnode
Description: Convert html node to vnode.
Author: raozhanping
Latest version: 0.1.2

# html2vnode

Convert html node to vnode.

## Usage

```ts
import { toVNode } from 'html2VNode'

// html => <div id="app">html2vnode</div>
const ele = document.querySelector('#app')
toVNode(ele)
// {
//    type: 'div',
//    props: { id: 'app' },
//    children: [
//      {
//        type: Symbol('TEXT'),
//        children: 'html2vnode',
//        props: {}
//      }
//    ]
//  }
```
🚀 A simple scene, we can use it to take dom snapshot. like these:

```js
import('https://cdn.jsdelivr.net/npm/@ricann/html2vnode@0.1.1/dist/html2vnode.umd.production.min.js')
// Which node you want to take snapshot.
// @param {string} selector
window.html2vnode.shot('html')
```

## Interface

#### toVNode
```ts
interface {
  toVNode(ele: Element): VNode
}
```

#### createVNode
```ts
interface createVNode {
  (type: VNodeTypes, props: Data | null, children: unknown ): VNode
}
```

#### createTextVNode
```ts
interface createTextVNode {
  (text: string) : VNode
}
```

#### createCommentVNode
```ts
interface createCommentVNode {
  (text: string) : VNode
}
```

#### VNode

```ts
interface VNode {
  type: VNodeTypes;
  props?: Record<string, any> | null;
  children?: NormalizedChildren;
  shapeFlag?: number;
}
```

## Command

TSDX scaffolds your new library inside `/src`.

To run TSDX, use:

```bash
npm start # or yarn start
```

This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.

To do a one-off build, use `npm run build` or `yarn build`.

To run tests, use `npm test` or `yarn test`.
npm package: @ricann/storage-map
Description: Use map structure to operate LocalStorage, SessionStorage, IndexDB and WebSQL
Author: raozhanping
Latest version: 0.0.3

# storage-map

[![builds][builds]][builds-url]
[![licenses][licenses]][licenses-url]

  Use map structure to operate LocalStorage, SessionStorage, IndexDB and WebSQL.

## Usage

```js
const createStorage = require('@ricann/storage-map')
// Create localStorage
const storage = createStorage('localStorage')
// Create sessionStorage
const storage = createStorage('sessionStorage')

// Using storage is like using Map.
// Set a key-value to storage, and it and localStorage or sessionStorage are in sync.
storage.set('key', 'value')
```

## Interface

```ts
abstract class StorageMap<T> implements Iterable<T> {
  abstract size: number
  abstract clear(): void
  abstract delete(key: string): void
  abstract entries(): Iterator<T>
  abstract forEach(callback: Function): void
  abstract get(key: string): any
  abstract has(key: string): boolean
  abstract keys(): Iterator<string>
  abstract set(key: string, value: any): void
  abstract values(): Iterator<any>
}
```

### startup

```shell
# install dependencies
yarn install

# build for production
yarn build

# test unit
yarn run test
# test unit with covarage
yarn run test -- --covarage

# submit git log with conventional style
yarn commit
```

[builds]:https://api.travis-ci.org/raozhanping/storage-map.svg?branch=master
[builds-url]:https://travis-ci.org/github/raozhanping/storage-map
[licenses]:https://app.fossa.com/api/projects/git%2Bgithub.com%2Fraozhanping%2Fstorage-map.svg?type=shield
[licenses-url]:https://app.fossa.com/projects/git%2Bgithub.com%2Fraozhanping%2Fstorage-map?ref=badge_shield