open-index/open-npm huggingface dataset:
npm package: @ne1410s/popup
Description: A lightweight configurable popup.
Author: ne1410s
Latest version: 0.3.185

# @ne1410s/popup

## A lightweight & configurable modal popup.

```html
<ne14-pop>
  <p>Hello world</p>
</ne14-pop>
```

- **Use:** `<script src="PATH_TO_UMD_SCRIPT"></script>`
- **Extend:** _npm i @ne1410s/popup_

### Attributes

```html
<ne14-pop move resize>YO' STUFF<ne14-pop></ne14-pop></ne14-pop>
```

- **move**: User can drag the popup around
- **resize**: User can alter the size of the popup
- **shrink**: (Requires **_resize_**: User can reduce size below that initially presented)
- **open**: The popup is opened immediately
- **no-close**: The close icon is not made available
- **style**: If supplied inline, the following styles are propagated to the element. They are fairly self-explanatory
  - `background-color`
  - `border-radius`
  - `box-shadow`

### Events

```javascript
const pop = document.querySelector('ne14-pop');

pop.addEventListener('open', () => {
  console.log('Just opened!');
});
```

- **open**: Fired when the popup is opened
- **close**: Fired when the popup is closed
- **confirmaccept**: Fired when the confirm callback allowed the popup to close
- **confirmreject**: Fired when the confirm callback prevented the popup from closing
- **dismissaccept**: Fired when the dismiss callback allowed the popup to close
- **dismissreject**: Fired when the dismiss callback prevented the popup from closing

### Methods

- **open()**: Opens the popup
- **close()**: Closes the popup
- **wrap()**: Wraps existing html element(s) in a new popup
- **confirm()**: Closes the popup, unless confirmCallback is provided and returns `false`
- **dismiss()**: Closes the popup, unless dismissCallback is provided and returns `false`.

### Properties

- **confirmCallback**: () => boolean: Return false to prevent a call to confirm from closing the popup
- **dismissCallback**: () => boolean: Return false to prevent a call to dismiss from closing the popup

### CSS Variables

Some degree of custom styling can be provided, by way of css variables:

```css
ne14-pop {
  --background: rgba(0, 0, 0, 0.5);
  --border-radius: 5px;
  --box-shadow: 5px 5px 20px black;
}
```

- **`--background`** _Background behind the popup. Defaults to: `rgba(0, 0, 0, .85)`_
- **`--border-radius`** _Border radius for the popup._
- **`--box-shadow`** _Box shadow for the popup (when stationary)._
npm package: @ne1410s/pxl8r
Description: A custom element that facilitates image pixelation.
Author: ne1410s
Latest version: 0.1.172

# @ne1410s/pxl8r

## A custom element that facilitates image pixelation.

```html
<ne14-pxl8r></ne14-pxl8r>
```

- **Use:** `<script src="PATH_TO_UMD_SCRIPT"></script>`
- **Extend:** _npm i -S @ne1410s/pxl8r_

### Attributes

```html
<ne14-pxl8r src="..."></ne14-pxl8r>
```

- **src**: Sets a new image source
- **filter**: Sets the contrast 0 - 100
- **resolution**: Sets the number of pixels in the _x_ dimension. (The aspect ratio is preserved)

### Events

```javascript
const tooltip = document.querySelector('ne14-pxl8r');

tooltip.addEventListener('render', (event) => {
  console.log('Rendered data:', event.detail);
});
```

- **change**: Fired when a parameter changes
- **render**: Fired when a filtered data has been applied

### Methods

- _There are no bespoke methods exposed by this element_

### Properties

- `set` **src** (string): Sets the attribute with the corresponding value
- **contrast** (number): Gets or sets the contrast 0 - 100
- **x** (number): Gets or sets the number of pixels in the _x_ dimension. The aspect ratio is preserved for y, unless y is otherwise set
- **y** (number): Gets or sets the number of pixels in the _y_ dimension. The aspect ratio is preserved for x, unless x is otherwise set

### CSS Variables

- _There are no css variables exposed by this element_
npm package: @ne1410s/scrollr
Description: A scroll viewer.
Author: ne1410s
Latest version: 0.1.293

# @ne1410s/scrollr

## Customisable & lightweight scrollbars.

```html
<ne14-scrollr>
  <span>Hello world</span>
</ne14-scrollr>
```

- **Use:** `<script src="PATH_TO_UMD_SCRIPT"></script>`
- **Extend:** _npm i -S @ne1410s/scrollr_

### Attributes

- _There are no bespoke attributes exposed in this element_

### Events

- _There are no bespoke events raised by this element_

### Methods

As well as specifying the element directly in HTML, it is also possible to wrap an element with scrollbars dynamically:

```javascript
window.ne_scrollr.apply('#existing-element', 'new-class-name');
```

- _[Module].apply(selector, (newClass))_

-- **selector**: CSS selector of element to wrap

-- **newClass**: Class to add to wrapper; e.g. to help deliver different styles to different scrollrs

### Properties

- _There are no bespoke properties exposed in this element_

### CSS Variables

A reasonable amount of custom styling can be provided, by way of css variables:

```css
ne14-scrollr {
  --max-width: 300px;
  --max-height: 200px;
}
```

- **`--background`** _Background for the scroll area. Not normally necessary; the background of the wrapped content should work in most cases_
- **`--color`** _Color for the draggable bars. Defaults to: `rgb(193, 193, 193)`_
- **`--cursor`** _Cursor for the draggable bars_
- **`--cursor-x`** _Cursor override for the horizontal bar_
- **`--cursor-y`** _Cursor override for the vertical bar_
- **`--margin`** _Separation between bar and side (only when inactive)_
- **`--max-width`** _Maximum width of the scroll area. Defaults to: `100%`_
- **`--max-height`** _Maximum height of the scroll area. Defaults to: `600px`_
- **`--min-length`** _Minimum bar length. Defaults to: `30px`_
- **`--outline`** _Outline for the bar_
- **`--radius`** _Border radius for the bar_
- **`--shadow`** _Shadow for the bar_
- **`--thickness`** _Thickness of the bar. Defaults to: `3px`_
- **`--track-color`** _Color for the track behind the bar_
- **`--track-cursor`** _Cursor for the track behind the bar_
- **`--transition-duration`** _Duration for several tranistions. Defaults to: `0.2s`_
- **`--active-color`** _Color for the bar (when active). Defaults to: `rgb(168, 168, 168)`_
- **`--active-outline`** _Outline for the bar (when active)_
- **`--active-radius`** _Border radius for the bar (when active)_
- **`--active-shadow`** _Box shadow for the bar (when active)_
- **`--active-thickness`** _Thickness of the bar (when active). Defaults to: `10px`_
- **`--active-track-color`** _Color for the track behind the bar (when active). Defaults to: `rgba(241, 241, 241, 0.3)`_

_\*The active state of the bar is triggered on hover_
npm package: @ne1410s/xprest
Description: RESTful express core library
Author: ne1410s
Latest version: 0.1.289

# @ne1410s/xprest

RESTful Express core library

## Designed For:

- Server-side packages using `express`
- Simplifying `express` routing for local resources
- Propagating dynamic rendering capabilities

## Not Designed For:

- Client-side
- Consuming another api (see `@ne1410s/http`)
npm package: @ne_fe/boot
Description: ne front end basic module
Latest version: 1.4.1

# @ne_fe/boot
![](https://img.shields.io/badge/version-1.4.1-green.svg?)
[![](https://img.shields.io/badge/nodejs->=8.0-green.svg?)](https://nodejs.org/en/)
[![](https://img.shields.io/badge/npm->=5.4-blue.svg)](https://www.npmjs.com/)
![](https://img.shields.io/badge/license-MIT-000000.svg)

## 简介
> ne 前端基础工程

## 安装&配置

全局安装该模块 `$ npm install @ne_fe/boot -g` 或 `$ npm install @ne_fe/boot -g --production`

## 使用
### 1 获取使用帮助
通过`ne -h`或`ne --help`查看使用帮助

```bash
$ ne -h
Usage: ne run [command] [option]

Options:

  -v, --version    output the version number
  -e --env [env]   what env do you want set
  --senv [senv]    what egg environment do you want
  -h, --help       output usage information

Commands:

  dev [options]    run project in dev mode
  build [options]  Only effective in dashboard or h5.
  lint             lint project code follow your eslint file
  packageName      echo project name
  packageVersion   echo project version
  startup:docker   startup. Only effective in docker container
  test             Only effective in service(egg.js)
  cov              Only effective in service(egg.js)
  ci               Only effective in service(egg.js)
```

### 2 获取版本号
通过`ne -v`或`ne --version`查看版本号
```bash
$ ne-create-project -v

 v1.4.1
```

### 3 指令说明
#### 3.1 dev
开发模式启动当前工程
```bash
$ ne run dev
```

#### 3.2 build
编译当前工程
```bash
$ ne run build
```

#### 3.3 lint
对当前工程进行语法检测
```bash
$ ne run lint
```

#### 3.4 packageName
输出当前工程的名称
```bash
$ ne run packageName
```
#### 3.5 packageVersion
输出当前工程的版本号
```bash
$ ne run packageVersion
```
#### 3.6 startup:docker
容器中启动该工程的命令
```bash
$ ne run startup:docker
```
#### 3.7 test
对当前工程进行单元测试，只在eggjs为基础的后端工程中有效
```bash
$ ne run test
```
#### 3.8 cov
生成当前工程的测试覆盖率报告，只在eggjs为基础的后端工程中有效
```bash
$ ne run cov
```
#### 3.9 ci
对当前工程进行语法检测并生成当前工程的测试覆盖率报告，只在eggjs为基础的后端工程中有效
```bash
$ ne run ci
```
### 4 设置环境变量
优先读取第一种方式设定的环境变量
#### 4.1 运行时注入
##### 4.1.1 -e --env
注入环境变量，可以用 process.env.k1 获取到
```bash
$ ne run dev -e k1=v1,k2=v2
$ ne run dev --env k1=v1,k2=v2
```
##### 4.1.2 senv
注入eggjs启动参数，只在eggjs为基础的后端工程中有效
```bash
$ ne run dev --senv port=7002
```
#### 4.2 在当前工程的package.json中写入
在当前工程的package.json中写入，格式为
默认在`dev`指令中注入了`NODE_ENV=development`
```bash
  "ne-env-[command]": {
    "k1": "v1",
    "k2": "v2"
  },
  "ne-senv-[command]": {
    "k1": "v1",
    "k2": "v2"
  }
```
其中 `ne-senv-[command]` 只在以eggjs为基础的后端工程中有效 \
例如
```bash
  "ne-env-dev": {
    "NODE_SYS": "dealer"
  },
  "ne-senv-dev": {
    "port": "7002"
  }
```

## 本地安装

工程目类下安装该模块 `$ npm install @ne_fe/boot --save-dev` \
提供基于githook的相关语法检查与commit信息检查

相关功能基于[yorkie](https://github.com/yyx990803/yorkie)和[lint-staged](https://github.com/okonet/lint-staged)进行修改

## 测试相关
请参照[yorkie](https://github.com/yyx990803/yorkie)和[lint-staged](https://github.com/okonet/lint-staged)
npm package: @ne_fe/koa-entry
Description: koa entry middleware for NxE
Author: ling.zou@nx-engine.com
Latest version: 1.0.7-test

### 简介

用到的依赖有dayjs，koa-compose，koa-send，koa-static-cache，winston

### 安装&配置

```bash
$ npm i @ne_fe/koa-entry -s
```

### 使用

- 基础用法

```js
const koaEntry = require('ne-koa-entry');

const staticPath = [ dir1, dir2 ];
app.use(koaEntry(
    staticPath // 需要映射静态资源的文件夹列表
));
```

- 使用prefix

```js
const staticPath = [ dir1, { path: dir2, prefix: '/template' }];
app.use(koaEntry(
    staticPath // 需要映射静态资源的文件夹列表
));
```

- 使用koa-webpack

```js
app.use(koaEntry(
    staticPath, // 需要映射静态资源的文件夹列表
    webpackConfig // webpack配置
));
```

- 使用回调函数

```js
app.use(koaEntry(
    staticPath, // 需要映射静态资源的文件夹列表
    webpackConfig, // webpack配置
    ctx => {
        console.log(ctx);
        ctx.body = '无权限访问';
    } // 回调函数，可以拿到ctx, 可以自定义页面内容
));
```
npm package: @ne_fe/koa-nginx
Description: ### 简介 [koa2](https://github.com/koajs/koa)的中间件，主要实现http的代理
Author: yong.liu
Latest version: 1.1.12

# @ne_fe/koa-nginx

### 简介
[koa2](https://github.com/koajs/koa)的中间件，主要实现http的代理

### 安装&配置说明
$ npm i @ne_fe/koa-nginx --save

### 使用
```
const Koa = require('koa');
const Proxy = require('@ne_fe/koa-nginx');
const app = new Koa();
const Nginx = Proxy.proxy({
  proxies: [
    {
      host: 'http://localhost:3333/',
      context: 'nginx'
    },
  ]
});
app.use(Nginx);
app.listen(3000);
    
```
- `proxyTimeout`
请求的超时时间, 单位毫秒,default 30000

- `rewrite`
路径重写选项,Funtion, 默认 `path.replace(context, '')`, 即去除设置的context路径

- `handleReq`
当数据经过代理前的钩子函数, 参数为一个对象. 包括`proxyReq`,`req`,`res`,`options`
```js
const Nginx = Proxy.proxy({
  proxies: ...,
  handleReq: proxyObj => {
    { proxyReq, req, res, options } = proxyObj;
  }
});
```

- `handleRes`
请求代理后的钩子函数, 包括 `proxyRes`,`req`,`res`

- `error`
请求代理错误的钩子函数,包括 `err`,`req`,`res`

- `proxies`
koa-nginx 的主要参数，数组形式。主要包含如下参数。
  * `target` 需要被代理到的地址
  * `context` 代理前缀，只有满足代理前缀的地址才能被代理。
  * `rewrite` 路径重写.
  * `proxyTimeout` 单独的代理配置的超时。
npm package: @ne_fe/koa-sign
Description: koa sign middleware for NxE
Author: caan.chen@nx-engine.com
Latest version: 1.0.6

### 简介

koa签名组件，包含签名赋请求头中间件与纯签名函数

### 安装&配置

```bash
$ npm i koa-sign --save
```

### 使用

#### 中间件，会在之后的ctx.request.headers上添加签名参数，供代理使用

```js
// {root}/server/index.js
const signMiddleware = require('koa-sign').middleware;
app.use(signMiddleware([
    {
        context:'/gateway-api', // 代理关键字
        appkey:'12345678', // 相对应的appkey
        secretkey:'87654321', // 相对应的secretkey
    },
    {
        context:'/dashboard-api',
        appkey:'000111222',
        secretkey:'333444555',
    }
]));
```

#### 签名函数，传入参数返回签名值sign

参数顺序 |参数名 |参数类型 |对象内参数 |对象内参数类型 |描述 | 是否必填 | 默认值 
--- | :--|:-- |--- |--- |--- |--- |--- 
1 |path |String | | |访问路径 | 是 | 
2 |timestamp |Number | | |时间戳 | 是 | 
3 |params |Object |method |String |访问类型 | 否 | "GET" 
3 |params |Object |token |String |token令牌 | 否 | "" 
3 |params |Object |query |Object |queryString | 否 | {} 
3 |params |Object |body |Object |body | 否 |  
4 |keyParams |Object |appkey |String |appkey | 是 |  
4 |keyParams |Object |secretkey |String |secretkey | 是 |  
```js
const signature = require('koa-sign').signature;

const timestamp = Date.now();
/**
 * akmg签名算法
 * @param path 访问路径
 * @param timestamp 时间戳
 * @param params 访问参数（method、token、query、body）
 * @param keyParams 密钥参数（appkey、secretkey）
 * @returns sign 签名值
 */
const sign = signature('/vehicle/addVeh', timestamp, {
    method:'POST',
    token:'',
    query:{
        vin:'LS123123',
    },
    body:{
        brandId:1,
        seriesId:2,
    }
},{
    appkey:'12345678',
    secretkey:'87654321',
})
```
npm package: @ne_fe/koa-xml-body
Description: koa middleware to parse xml request body
Author: creeperyang
Latest version: 2.0.0

# koa-xml-body

[![Build Status](https://travis-ci.org/creeperyang/koa-xml-body.svg?branch=master)](https://travis-ci.org/creeperyang/koa-xml-body)
[![npm version](https://badge.fury.io/js/koa-xml-body.svg)](https://badge.fury.io/js/koa-xml-body)
[![Dependency Status](https://david-dm.org/creeperyang/koa-xml-body.svg)](https://david-dm.org/creeperyang/koa-xml-body)
[![download times](https://img.shields.io/npm/dm/koa-xml-body.svg)](https://www.npmjs.com/package/koa-xml-body)

> Parse xml request body for Koa

## Install

[![NPM](https://nodei.co/npm/koa-xml-body.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/koa-xml-body/)

## Usage

```js
const koa = require('koa')
const xmlParser = require('koa-xml-body')

const app = koa()
app.use(xmlParser())

app.use(function(ctx, next) {
    // the parsed body will store in this.request.body
    // if nothing was parsed, body will be undefined
    ctx.body = ctx.request.body
    return next()
})
```

`koa-xml-body` will carefully check and set `context.request.body`, so it can **intergate** well with other body parsers such as `koa-bodyparser`:

```js
// ...
const bodyParser = require('koa-bodyparser')

// ...
app.use(xmlParser())
app.use(bodyParser())
```

**Note:**

Current version (`v2.x`) of `koa-xml-body` is writtern with `ES2015` and for `koa@2`. If you use `koa@1.x`, use `koa-xml-body@1.x` instead.


## Options

- **encoding**: requested encoding. Default is `utf8`. If not set, the lib will retrive it from `content-type`(such as `content-type:application/xml;charset=gb2312`).
- **limit**: limit of the body. If the body ends up being larger than this limit, a 413 error code is returned. Default is `1mb`.
- **length**: length of the body. When `content-length` is found, it will be overwritten automatically.
- **onerror**: error handler. Default is a `noop` function. It means it will **eat** the error silently. You can config it to customize the response.
- **xmlOptions**: options which will be used to parse xml. Default is `{}`. See [`xml2js Options`](https://github.com/Leonidas-from-XIV/node-xml2js#options) for details.

```js
app.use(xmlParser({
    limit: 128,
    encoding: 'utf8', // lib will detect it from `content-type`
    xmlOptions: {
        explicitArray: false
    },
    onerror: (err, ctx) => {
        ctx.throw(err.status, err.message);
    }
}))
```

## Licences

[MIT](LICENSE)
npm package: @ne_fe/page-cli
Description: generate page by json
Author: caan.chen@nx-engine.com
Latest version: 1.0.3

### 简介

利用命令行与JSON配置，生成最简单的dashboard增删改查页面，具体业务需求还需进行具体修改。

### 安装&配置

```bash
$ npm i -g ne-page-cli
```

### 使用

#### 先准备好json配置，放在哪里都可以

```json
// {root}/devDep/data.json
{
  "search": {
    "type": "normal",
    "field": {
      "name": "姓名",
      "age": "年龄"
    }
  },
  "table": {
    "field": {
      "name": "姓名",
      "age": "年龄",
      "createTime": "创建时间"
    }
  },
  "modal": {
    "field": {
      "name": "姓名",
      "age": "年龄",
      "status": "状态"
    }
  }
}
```
- search.type有两种值可选：
  - 1.normal：普通搜索表单，建议表单少的时候使用（一行可以排完的情况）
  - 2.form：Form搜索表单，建议表单多的时候使用（一行不能排完的情况）

#### 执行命令行

```bash
ne-page -c ./devDep/data.json -p ./client/page/admin/HelloDashboard.vue
```

#### ne-page -h 可查看帮助

```bash
Options:

    -V, --version              output the version number
    -c, --config <configPath>  required, the path of the JSON configuration
    -p, --path <filePath>      The path(include name) of the file you want to generate
    -h, --help                 output usage information

```

#### 注意事项
* 1.config配置路径必须配置，且为标准的json格式，例子中的字段都必填。search和modal字段会生成Input组件，modal字段会默认加必填校验，table字段会生成key、title，按需修改即可。
* 2.path文件路径可以不配，将会执行目录下生成在Unknown.vue
* 3.期望在工程根目录下并且安装eslint后执行该命令，否则eslint修复文件则会失败
npm package: @ne_fe/webpack
Description: wepback config for NxE
Author: caan.chen@nx-engine.com
Latest version: 1.5.5

### 简介

webpack4配置（已含babel-loader以及babel-polyfill，postcss-loader，eslint-loader等）

### 安装&配置

```bash
$ npm i @ne_fe/webpack --save-dev
```

### 使用
#### config配置js对象

```js
const { vue_dashboard_dev, vue_dashboard_prod, vue_h5_dev, vue_h5_prod } = require('@ne_fe/webpack');
```

#### 支持扩展webpack配置
在项目执行目录下新建webpack.config.js
```js
module.exports = {
  module: {
    ...
  },
  rule: {
    ...
  },
};
```

#### 示例

- 开发模式，和ne-koa-entry结合使用，详情查看[ne-koa-entry文档](http://git.nx-code.com/ne-fe/koa/ne-koa-entry)

server/index.js

```js
app.use(koaEntry(
  [ webRoot ],
  process.env.NODE_ENV === 'development' ? require('@ne_fe/webpack').vue_dashboard_dev : ''
));
```

package.json

```json
{
    "scripts":{
        "dev":"cross-env NODE_ENV=development node server/server.js"
    }
}
```

- 生产模式

package.json
```json
{
    "scripts":{
        "build":"ne-webpack -c vue_dashboard"
    }
}
```
npm package: @neabyte/auth-core
Description: Auth validation, normalization, and generation for modern runtimes
Author: NeaByteLab
Latest version: 0.3.0

<div align="center">

# Auth Core

Auth validation, normalization, and generation for modern runtimes.

[![Module type: Deno/ESM](https://img.shields.io/badge/module%20type-deno%2Fesm-brightgreen)](https://github.com/NeaByteLab/Auth-Core) [![npm version](https://img.shields.io/npm/v/@neabyte/auth-core.svg)](https://www.npmjs.org/package/@neabyte/auth-core) [![JSR](https://jsr.io/badges/@neabyte/auth-core)](https://jsr.io/@neabyte/auth-core) [![CI](https://github.com/NeaByteLab/Auth-Core/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Auth-Core/actions/workflows/ci.yaml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

</div>

## Features

- **Cipher** — Encrypt and decrypt with a shared secret; URL-safe output.
- **Email** — Validate, normalize, and extract domain or local part.
- **Fullname** — Validate and normalize human names with optional formatting.
- **Hostname** — Validate and normalize hostnames (e.g. for TLS or DNS).
- **Password** — Validate rules, score strength, or generate random passwords.
- **Pin** — Validate and normalize numeric PINs (e.g. 4–8 digits).
- **Username** — Validate and normalize usernames (letters, numbers, underscore).

## Installation

### Deno

```bash
deno add jsr:@neabyte/auth-core
```

### npm

```bash
npm install @neabyte/auth-core
```

### CDN (browser / any ESM)

```html
<script type="module">
  import { Email, Password, Username } from 'https://esm.sh/@neabyte/auth-core'
  // or pin version: .../auth-core@x.x.x
</script>
```

- Latest: `https://esm.sh/@neabyte/auth-core`
- Pinned: `https://esm.sh/@neabyte/auth-core@<version>`

## Quick Start

Import the classes you need.

- Use `isValid()` for a quick boolean check
- `validate()` when you need `{ valid, errors }` (e.g. to show errors in a form)
- `normalize()` when you want a cleaned string to store or display, or `null` if invalid.

```typescript
import { Email, Password, Username } from '@neabyte/auth-core'

Email.isValid('john@doe.com')
// true

Password.validate('short', { minLength: 8 })
// { valid: false, errors: ['Password must be at least 8 characters'] }

Username.normalize('  Jane_Doe  ')
// 'jane_doe'
```

> [!NOTE]
> TypeScript types (e.g. `PinResult`, `PasswordOptions`) are exported. More details: [USAGE.md](USAGE.md)

## Build & Test

From the repo root (requires [Deno](https://deno.com/)).

**Check** — format, lint, and typecheck source:

```bash
deno task check
```

**Unit tests** — format/lint tests and run all tests:

```bash
deno task test
```

Tests live under `tests/` (one file per module).

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.
npm package: @neabyte/daytime
Description: Modern date library with chainable methods and rich formatting options
Author: NeaByteLab
Latest version: 0.1.0

# Daytime [![Module type: CJS+ESM](https://img.shields.io/badge/module%20type-cjs%2Besm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm) [![npm version](https://img.shields.io/npm/v/@neabyte/daytime.svg)](https://www.npmjs.org/package/@neabyte/daytime) [![JSR](https://jsr.io/badges/@neabyte/daytime)](https://jsr.io/@neabyte/daytime) [![Node.js CI](https://github.com/NeaByteLab/Daytime/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Daytime)

**Modern date library with chainable methods and rich formatting options.**

The library is available as **CJS**, **ESM**, and **JSR** packages. You can install it via npm, Deno, or CDN.

## Installation

> Ready to get started? Follow our [step-by-step installation guide](https://docs-daytime.neabyte.com/getting-started/installation/) to set up **Daytime**.

```bash
npm install @neabyte/daytime
```

## Example Usage

```typescript
import daytime from '@neabyte/daytime'

const date = daytime('2077-01-01')
console.log(date.format('YYYY-MM-DD Do dddd'))
// "2077-01-01 1st Friday"

console.log(date.add(1, 'year').format('dddd, DD-MM-YYYY [at] HH:mm:ss'))
// "Saturday, 01-01-2078 [at] 07:00:00"

console.log(date.getDaysInMonth().map(day => day.format('YYYY-MM-DD Do dddd')))
// [
//   '2077-01-01 1st Friday',
//   '2077-01-02 2nd Saturday',
//   '2077-01-03 3rd Sunday',
//   '2077-01-04 4th Monday',
//   '2077-01-05 5th Tuesday',
//   '2077-01-06 6th Wednesday',
//   '2077-01-07 7th Thursday',
//   '2077-01-08 8th Friday',
//   '2077-01-09 9th Saturday',
//   ...
// ]
```

## Documentation

See the [official documentation](https://docs-daytime.neabyte.com) for more details about the library.

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
npm package: @neabyte/haversine
Description: Fast accurate Haversine distance calculator for coordinates
Author: NeaByteLab
Latest version: 0.1.0

# Haversine [![Module type: CJS+ESM](https://img.shields.io/badge/module%20type-cjs%2Besm-brightgreen)](https://github.com/NeaByteLab/Haversine) [![npm version](https://img.shields.io/npm/v/@neabyte/haversine.svg)](https://www.npmjs.org/package/@neabyte/haversine) [![JSR](https://jsr.io/badges/@neabyte/haversine)](https://jsr.io/@neabyte/haversine) [![Node.js CI](https://github.com/NeaByteLab/Haversine/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Haversine)

Fast accurate Haversine distance calculator for coordinates.

## Installation

Choose your preferred package manager:

```bash
# npm package
npm install @neabyte/haversine

# Deno module
deno add jsr:@neabyte/haversine
```

## Usage

```typescript
import Haversine from '@neabyte/haversine'

// Calculate distance in kilometers
const distanceKm = Haversine.calculate(
  { lat: 40.7128, lon: -74.006 }, // New York
  { lat: 51.5074, lon: -0.1278 }, // London
  'km'
)

// Calculate distance in meters
const distanceM = Haversine.calculate(
  { lat: 40.7128, lon: -74.006 }, // New York
  { lat: 51.5074, lon: -0.1278 }, // London
  'm'
)

console.log(`Distance: ${distanceKm} km`) // Distance: 5570.23 km
console.log(`Distance: ${distanceM} m`) // Distance: 5570228.56 m
```

## API Reference

### `Haversine.calculate(firstLocation, secondLocation, distanceUnit)`

Calculate the distance between two coordinate points using the Haversine formula.

**Parameters:**

- `firstLocation: Location` - First coordinate pair with `lat` and `lon` properties
- `secondLocation: Location` - Second coordinate pair with `lat` and `lon` properties
- `distanceUnit: DistanceUnit` - Either `'km'` for kilometers or `'m'` for meters

**Returns:** `number` - The calculated distance in the specified unit

**Types:**

```typescript
interface Location {
  lat: number // Latitude in degrees (-90 to 90)
  lon: number // Longitude in degrees (-180 to 180)
}

type DistanceUnit = 'km' | 'm'
```

## Error Handling

The library validates all inputs and provides clear error messages:

```typescript
// Invalid coordinates
Haversine.calculate({ lat: 'invalid', lon: 74 }, location, 'km')
// Throws: "First location must have numeric latitude and longitude values"

// Invalid distance unit
Haversine.calculate(location1, location2, 'feet')
// Throws: "Distance unit must be either \"km\" for kilometers or \"m\" for meters"

// Missing location
Haversine.calculate(null, location, 'km')
// Throws: "First location parameter is required"
```

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
npm package: @neabyte/jsonary
Description: File-based JSON database for TypeScript, with a simple query builder
Author: NeaByteLab
Latest version: 1.1.0

<div align="center">

# Jsonary

File-based JSON database for TypeScript, with a simple query builder.

[![Node](https://img.shields.io/badge/node-%3E%3D22-339933?logo=node.js&logoColor=white)](https://nodejs.org) [![Deno](https://img.shields.io/badge/deno-compatible-ffcb00?logo=deno&logoColor=000000)](https://deno.com) [![Bun](https://img.shields.io/badge/bun-compatible-f9f1e1?logo=bun&logoColor=000000)](https://bun.sh)

[![Module type: Deno/ESM](https://img.shields.io/badge/module%20type-deno%2Fesm-brightgreen)](https://github.com/NeaByteLab/Jsonary) [![npm version](https://img.shields.io/npm/v/@neabyte/jsonary.svg)](https://www.npmjs.org/package/@neabyte/jsonary) [![JSR](https://jsr.io/badges/@neabyte/jsonary)](https://jsr.io/@neabyte/jsonary) [![CI](https://github.com/NeaByteLab/Jsonary/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Jsonary/actions/workflows/ci.yaml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

</div>

## Features

- **Simple file-backed storage** - One JSON file, no database server needed.
- **Everyday data work** - Insert, read, update, delete, clear, and reload.
- **Flexible filtering** - Chain filters, then read or modify matching.
- **Structured records** - Query and update nested object fields easily.

## Installation

> [!NOTE]
> **Prerequisites:** For **Deno** (install from [deno.com](https://deno.com/)). For **npm** use Node.js (e.g. [nodejs.org](https://nodejs.org/)).

**Deno (JSR):**

```bash
deno add jsr:@neabyte/jsonary
```

**npm:**

```bash
npm install @neabyte/jsonary
```

## Quick Start

Create a database instance and start inserting/querying objects.

```typescript
import Jsonary from '@neabyte/jsonary'

// Initialize database file (auto-created on first write)
const db = new Jsonary({ path: './data.json' })

// Insert one record
db.insert({ name: 'John', age: 30 })
// Insert many records
db.insertMany([
  { name: 'Jane', age: 25 },
  { name: 'Bob', age: 35 }
])

// Filter records with string condition
const adults = db.where('age >= 18').get()
// Get first matching record
const firstJohn = db.where('name = John').first()
```

- [USAGE.md](USAGE.md) for more examples and query operator details.

## Build

**npm build (bundles to `dist/`):**

```bash
npm run build
```

## Testing

**Type check** — format, lint, and type-check:

```bash
deno task check
```

**Unit tests** — format/lint tests and run all tests:

```bash
deno task test
```

- Tests live under `tests/` (public API tests in `tests/jsonary.test.ts`).
- The test task uses `--allow-read`, `--allow-write`, and `--allow-env`.

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for details.
npm package: @neabyte/stackz
Description: Beautiful stack trace formatter with source code context for JavaScript
Author: NeaByteLab
Latest version: 0.1.0

# Stackz [![Module type: CJS+ESM](https://img.shields.io/badge/module%20type-cjs%2Besm-brightgreen)](https://github.com/NeaByteLab/Stackz) [![npm version](https://img.shields.io/npm/v/@neabyte/stackz.svg)](https://www.npmjs.org/package/@neabyte/stackz) [![JSR](https://jsr.io/badges/@neabyte/stackz)](https://jsr.io/@neabyte/stackz) [![Node.js CI](https://github.com/NeaByteLab/Stackz/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Stackz)

Beautiful stack trace formatter with source code context for JavaScript.

![Demo](./assets/demo.png)

## Features

- **Cross-runtime support** - Works in Deno, Node.js, Bun, and browsers
- **Source code context** - Shows actual code around error locations (detailed mode)
- **Two formatting styles** - Compact and detailed stack traces
- **ANSI colors** - Beautiful terminal output with syntax highlighting

## Installation

Choose your preferred package manager:

```bash
# npm package
npm install @neabyte/stackz

# Deno module
deno add jsr:@neabyte/stackz
```

## Usage

```typescript
import Stackz from '@neabyte/stackz'

try {
  // Your code that might throw
  throw new Error('Something went wrong')
} catch (error) {
  // Compact format without source context
  console.log(Stackz.format(error, 'compact'))
  // Detailed format with source context
  console.log(await Stackz.format(error, 'detailed'))
}
```

## Formats

### Compact

```
TypeError  Cannot read properties of undefined (reading 'property')
  → createTypeError @ index.ts:5:14
  → index.ts:15:3
```

### Detailed

```
TypeError  Cannot read properties of undefined (reading 'property')

Path: /path/to/project/index.ts:5:14
  2 |
  3 | function createTypeError() {
  4 |   const obj = undefined as any
  5     return obj.property // This will create TypeError with real stack
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6 | }

Call Stack:
 • createTypeError → index.ts:5:14
 • anonymous → index.ts:15:3
```

## License

This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
npm package: @nealalim122322/encryption
Description: Data encryption in Next.js
Author: Neal Alim
Latest version: 1.0.1

# Data encryption for Next.js
A simple data encryption that can be use in Next.js

## Installation

```sh
npm i @nealalim122322/encryption
```

## Usage

```jsx
import NealCrypto from "@nealalim122322/encryption";
const crypto = new NealCrypto(process.env.NEXT_PUBLIC_SECRET_KEY);

const encryptedPassword = await crypto.encrypt("YOUR STRING");
console.log(`Encrypted: ${encryptedPassword}`);

const decryptedPassword = await crypto.decrypt(encryptedPassword);
console.log(`Decrypted: ${decryptedPassword}`);
```
npm package: @nealalim26/utils
Description: Personal utility functions
Author: NeaL Alim
Latest version: 1.0.29

## Personal Utilities

```sh
npm install @nealalim26/utils
```

### Development

```sh
npm init
```

### Testing

#### Link for local package (for development run this command in the main repo)

```sh
npm link
```

#### Install the local package to test script.js

```sh
npm link @nealalim26/utils
```

### Publishing

#### Make sure to run `npm login` before publishing also check the version in package.json

```sh
npm publish --access public
```