open-index/open-npm huggingface dataset:
npm package: @liplum/ioc
Description: A lightweight dependency injection container.
Author: Liplum
Latest version: 0.1.0

# @liplum/ioc

## Installation

```sh
yarn add @liplum/ioc
# or
npm i --save @liplum/ioc
```

## Container

```ts
import { Container } from "@liplum/ioc";
const container = new Container();
```
npm package: @liplum/lateinit
Description: Lazy initialized variables.
Author: Liplum
Latest version: 0.0.1

# Lateinit

## Installation

```sh
yarn add @liplum/lateinit
# or
npm i @liplum/lateinit
# or
pnpm i @liplum/lateinit
```

## Usage

### Basic usage

```js
import lateinit from "@liplum/lateinit"
let counter = 0
const a = lateinit(() => ++counter)
console.log()
t.assert(a() === 1)
t.assert(a() === 1)
```
npm package: @liplum/str2bool
Description: Convert a string to boolean
Author: Liplum
Latest version: 0.0.1

# str2bool.js

Convert a string to boolean value.

## Installation

```sh
yarn add @liplum/str2bool
# or
npm i @liplum/str2bool
# or
pnpm i @liplum/str2bool
```

## Usage

Basic usage

```js
import str2bool from "@liplum/str2bool"

console.log(str2bool("true") === true)
console.log(str2bool("false") === false)

console.log(str2bool("") === false)
console.log(str2bool("0") === false)
console.log(str2bool("1") === true)
```

Yes or No

```js
console.log(str2bool("yes",{ yesOrNo: true }) === true)
console.log(str2bool("y",{ yesOrNo: true }) === true)

console.log(str2bool("no",{ yesOrNo: true }) === false)
console.log(str2bool("n",{ yesOrNo: true }) === false)
```

The following strings will be considered as `true`:

- "true"
- "1", "-1", "0.1" and other strings can be converted to a number that isn't zero
- [Non-strict mode] "javascript", "node.js", and any non-empty string

The following strings will be considered as `false`:

- "" (empty string)
- "false"
- "0"

In strict mode, any non-empty string like "javascript" and "node.js" will result in `undefined`.

If `trim` is true, the strings containing only whitespace characters will be trimmed to an empty string,
and be considered as `false`.

If `truthy` or `falsy` are given,
then they will be tested after the above cases.

Configure the options:

```ts
export interface Str2BoolOptions {
  /**
   * The string will be trimed before being converted.
   * 
   * true by default.
   */
  trim?: boolean
  /**
   * In strict mode, strings that cannot be considered either `true` or `false` result in `undefined`.
   * In non-strict mode, any other non-empty strings will be consider as `true`.
   * 
   * false by default.
   */
  strict?: boolean
  /**
   * Ignore the case.
   * 
   * true by default.
   */
  ignoreCase?: boolean

  /**
   * If enabled, "yes" and "y" will be considered as `true`,
   * while "no" and "n" will be considered as `false`.
   * 
   * false by default.
   */
  yesOrNo?: boolean

  /**
   * The strings will be considered as `true`
   */
  truthy?: string[]
  /**
   * The strings will be considered as `false`
   */
  falsy?: string[]
}
```
npm package: @lipnstar/component-library
Description: 一个业务组件库
Author: Lipn
Latest version: 5.0.0

# Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).

> 发布包
> npm publish --access public

前提：
1. 要确保已经登录 npm 账号
`npm whoami` 命令 查看当前是否已经登录
2.
npm package: @liprikon/epub-parser
Description: A (fork of) powerful yet easy-to-use epub parser
Author: gaoxiaoliangz
Latest version: 2.1.10

# 📖 epub-parser (fork)

> A (fork of) powerful yet easy-to-use epub parser

[![npm version](https://badge.fury.io/js/%40gxl%2Fepub-parser.svg)](https://badge.fury.io/js/%40gxl%2Fepub-parser)
![Test](https://github.com/gaoxiaoliangz/epub-parser/workflows/Test/badge.svg)

The package exports a simple parser function which use epub file as input and output JavaScript object.

As it is written in TypeScript, types are already included in the package.

## Install

```bash
npm install @gxl/epub-parser --save
```

or if you prefer yarn

```bash
yarn add @gxl/epub-parser
```

## Usage

```js
import { parseEpub } from '@gxl/epub-parser'

const epubObj = parseEpub('/path/to/file.epub', {
  type: 'path',
})

console.log('epub content:', epubObj)
```

### parseEpub(target: string | buffer, options?: object): EpubObject

#### target

type: `string` or `buffer`

It can be the path to the file or file's binary string or buffer

#### options

type: `object`

##### type(optional): 'binaryString' | 'path' | 'buffer'

It forces the parser to treat supplied target as the defined type, if not defined the parser itself will decide how to treat the file (useful when you are not sure if the path is valid).

#### EpubObject

The output is an object which contains `structure`, `sections`, `info`(private property names start with `_`. I don't recommend using them, since they are subscribed to change).

`structure` is the parsed `toc` of epub file, they contain information about how the book is constructed.

`sections` is an array of chapters or sections under chapters, they are referred in `structure`. Each section object contains the raw html string and a few handy methods.

- `Section.prototype.toMarkdown`: convert to markdown object.
- `Section.prototype.toHtmlObjects`: convert to html object. And a note about `src` and `href`, the `src` and `href` in raw html stay untouched, but the `toHtmlObjects` method resolves `src` to base64 string, and alters `href` so that they make sense in the parsed epub. And the parsed `href` is something like `#{sectionId},{hash}`.

## How to contribute

- Raise an issue in the issue section.
- PRs are the best.

❤️