open-index/open-npm huggingface dataset:
npm package: @monvechen/cookie-manager
Description: for manager cookies
Author: Monve
Latest version: 1.0.18

# cookie-manager

for manager cookies

#### state

refer to <https://github.com/juji/cookie-manager>

#### Usage

##### CookieManager

```js
import { CookieManager } from "@monvechen/cookie-manager"

const cm = new CookieManager();

cm.store( 
 [
  'cna=111; Expires=someDate; domain=.example.com; path=/; secure',
  'name=222; Expires=someDate; domain=.example.com; path=/; HttpOnly'
   'cannel=333; Expires=someDate; domain=www.example.com; path=/; HttpOnly'
 ],
 'https://example.com/test/path'
);

const cookies = cm.prepare( 'http://example.com' );
// 'cna=111; name=222'

const arr = cm.exportOriginStrArr()
//[
//  'cna=111; Expires=someDate; domain=.example.com; path=/; secure',
//  'name=222; Expires=someDate; domain=.example.com; path=/; HttpOnly'
//  'cannel=333; Expires=someDate; domain=www.example.com; path=/; HttpOnly'
// ]

//clear all
cm.reset()
```

##### cookieTool

```js
import { cookieTool } from "@monvechen/cookie-manager"

cookieTool.parse('cna=111; Expires=someDate; domain=.example.com; path=/; secure')
//{name:'cna',value:'111',expires:'someDate', path:'/', secure:true}

cookieTool.stringify({name:'cna',value:'111',expires:'someDate', path:'/', secure:true})
//'cna=111; Expires=someDate; domain=.example.com; path=/; secure'

cookieTool.tokenize(
  [
    {name:'cna',value:'111',expires:'someDate', path:'/', secure:true},
    {name:'cannel',value:'222',expires:'someDate', path:'/', secure:true}
  ]
)
//'cna=111; cannel=222'

//clear all
cm.reset()
```
npm package: @monvechen/kafka-easy
Description: easy use for kafkajs
Author: Monve
Latest version: 1.0.5

# kafka-easy
#### About the Project

easy use for kafkajs

#### Usage

```js
import { KafkaEasy } from './utils/KafkaEasy'

const kafka = new KafkaEasy({
  clientId: 'my-app',
  brokers: [
    "lzb-kafka.dibiaozuitu.com:9092"
  ],
  retry: {
    retries: 8
  }
}, 'topic')

#producer send msg
kafka.send([{ value: '1' }])

#consumer subscribe
kafka.subscribe((msg)=>{
  console.log(msg);
})

```
npm package: @monvechen/port-check
Description: Check if the port is reachable
Author: Monve
Latest version: 1.0.6

# port-check
Check if the port is reachable

#### Usage

```js
import { isReachable } from 'port-check'

console.log(await isReachable({host:'www.baidu.com',port:80}))
//true

```
npm package: @monvechen/sleep
Description: easy way to await sleep
Author: Monve
Latest version: 1.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# sleep
just a easy way to `await` sleep

#### Usage

```js
import { sleep } from '@monvechen/sleep';

const main = async () => {
  //sleep 1000 ms
  await sleep(1000);
}

```
npm package: @monvechen/version-compare
Description: for compare version
Author: Monve
Latest version: 1.0.4
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# version-compare
compare two versions

#### state

refer to https://github.com/juji/cookie-manager and fix some bug

#### Usage

```js
import { Ver, versionCompare, VersionIs } from 'version-compare'

new Ver('1.2.7').isGreaterThan('1.0.2')
//true

new Ver('1.0.1').isEqualTo('1.2.7')
//false

new Ver('1.0.1').isLessThan('1.2.7')
//true

versionCompare('1.1', '1') === VersionIs.LessThan
// false
versionCompare('1.1', '1') === VersionIs.GreaterThan
// true
console.log(['1.1', '2', '1.0'].sort(versionCompare))
// 1.0, 1.1, 2

```