open-index/open-npm huggingface dataset:
npm package: @nailyjs/metadata
Description: TC39 stage 3 proposal for Reflect.metadata API for babel
Author: Zero
Latest version: 0.1.0

# TC39 Stage 3 提案 TypeScript 装饰器 metadata

[English](./README.en.md)

## 介绍

众所周知，TypeScript 5.x目前还没有实现装饰器的元数据，这使得我们无法在运行时获取装饰器的元数据。这个仓库使用babel插件的方式，实现了装饰器的元数据。

其实原理很简单，整个项目只有一个文件，就是`src/index.ts`，它的作用就是修改`Reflect.metadata`。

`Reflect.metadata`是旧版本的装饰器元数据的实现，有一个Babel仓库`babel-plugin-transform-typescript-metadata`，它的作用是将TypeScript的装饰器元数据转换为`Reflect.metadata`。

- Go to [babel-plugin-transform-typescript-metadata](https://github.com/leonardfactory/babel-plugin-transform-typescript-metadata/tree/master) Repo

而这个仓库的作用是将`Reflect.metadata`转换为新版本的装饰器元数据，这样就可以在运行时获取装饰器元数据了。

源码很简单，只有一个文件，但是实现了这个很重要的功能，有所帮助。

## 使用

```bash
npm install @nailyjs/metadata
```

```ts
// 首先在最顶上引入@nailyjs/metadata
import "@nailyjs/metadata";

// 定义一个Stage 3装饰器
function log() {
  return (target: Function, ctx: DecoratorContext) => {};
}

@log()
class TestService {
  constructor(readonly i: number) {}

  @log()
  test() {}
}

console.log(TestService[Symbol.metadata]);
```

上面的代码会输出为：

```js
[Object: null prototype] {
  'design:method': {
    test: { 'design:paramtypes': [], 'design:type': [Function: Function] }
  },
  'design:class': {
    'design:paramtypes': [ [Function: Number] ],
    'design:type': [Function: Function]
  }
}
```

见本仓库的`test`目录的例子。
npm package: @naingyeaung/sdk
Description: 🛠 An SDK for building applications on top of pancakeswap.
Latest version: 1.0.1

# Pancakeswap SDK

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Actions Status](https://github.com/pancakeswap/pancakeswap-sdk/workflows/CI/badge.svg)](https://github.com/pancakeswap/pancakeswap-sdk)
[![npm version](https://img.shields.io/npm/v/@pancakeswap-lib/sdk/latest.svg)](https://www.npmjs.com/package/@pancakeswap-lib/sdk/v/latest)

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/pancakeswap/pancakeswap-sdk.git
```

Move into the pancakeswap-sdk working directory

```sh
cd pancakeswap-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @naira0/jstore
Description: A blazing fast formatted text storage library.
Author: Naira
Latest version: 1.0.5

# jstore
A blazing fast formatted text storage library.

## Install
`npm install @naira0/jstore` 

sadly jstore was taken so i had to add my username to it.

## Usage & format

#### Disclaimer: this is not a database.

For more info check out the [wiki](https://github.com/Naira0terminator/jstore/wiki)

#### Usage:
```javascript
const Jstore = require('@naira0/jstore');
const jstore = new Jstore('data');

jstore.set('settings', 'fullscreen', true);
const fullscreen = jstore.get('settings', 'fullscreen');

console.log(fullscreen); // Output: True
```

#### jstore file output
```
[settings]
fullscreen = true
```
npm package: @nait-aits/helper
Description: A set of helper functions for React/JavaScript
Author: NAIT AITS
Latest version: 1.4.2

## Installation

```console
// with npm
npm install @nait-aits/helper
```

## Usage Examples

# 1. React Hooks Helpers

```javascript
import {
  usePrevious,
  useMultiStates,
  useMapStates,
  useDebounce,
  useEditDebounce,
  useOneState,
  useUndoableState,
} from "@nait-aits/helper/hooks";

const SamplePage = (props: Props) => {
  const [count, setCount] = useState(0);
  const prev = usePrevious(count);

  return <></>;
};

export default SamplePage;
```

# 2. A set of polyfill methods available to call globaly.

- Array.avg
- Array.compact
- Array.chunk
- Array.groupBy
- Array.isEqualTo
- Array.max
- Array.maxOf
- Array.min
- Array.minOf
- Array.orderBy
- Array.sample
- Array.sum
- Array.uniq
- Array.uniqOf
- Array.without
- Function.compose
- Function.curry
- Function.partial
- Function.partialArg
- Number.pad
- Object.isEqual
- String.isWhiteSpace
- globalThis.isNullish
- globalThis.reactClassNames

Please see details in each method and type definition. Simply import the file at the top in the root file like app.tsx or index.tsx, and the methods will be available globally.

```javascript
import "@nait-aits/helper/polyfills";
```

If your project includes Storybook, please add the _**require**_ statement to **.storybook/preview.js** file.

```javascript
require("@nait-aits/helper/polyfills");
```

For newer version of webpack, you may need to use **polyfills-es** instead.

```javascript
import "@nait-aits/helper/polyfills-es";
```

# 3. Cryptography hash and encryption functions

```javascript
import {
  SHA1Hash,
  SHA256Hash,
  SHA512Hash,
  AESEncrypt,
  AESDecrypt,
} from "@nait-aits/helper/cryptography";
```
npm package: @nait-aits/redux
Description: ```console // with npm npm install @nait-aits/redux ```
Author: NAIT AITS
Latest version: 1.0.0

## Installation

```console
// with npm
npm install @nait-aits/redux
```

## Update Notes
* May 16, 2022 - React 18. May work with older versions of react. YMMV.

## Usage Example (duck file)

```javascript
import { createAsyncAction, ReducerState } from "@nait-aits/redux";

const controlName = "samplePage";

type LoadTestData = {
    data: string;
};

var loadTest = createAsyncAction<LoadTestData, { id: string | number }, State>({
  actionPrefix: controlName,
  actionName: "loadTestData",
  url:"https://someUrl",
  pending: (state, action) => {
    state.testDataState.isLoading = true;
    state.testDataState.data = undefined;
  },
  fulfilled: (state, action) => {
    state.testDataState.isLoading = false;
    state.testDataState.data = action.payload;
  },
  rejected: (state, action) => {
    state.testDataState.isLoading = false;
    state.testDataState.error = action.payload;
  },
});

type State = {
  testDataState: ReducerState<LoadTestData>;
};

var slice = createSlice({
  name: controlName,
  initialState: {
    testDataState: {
      isLoading: false,
    },
  } as State,
  reducers: {},
  extraReducers: {
    ...loadTest.reducer,
  },
});

const ret = {
  reducer: {
    [controlName]: slice.reducer,
  },
  actions: {
    [controlName]: {
      ...slice.actions,
      loadTest: loadTest.action,
    },
  },
};
```
npm package: @nait-aits/ui
Description: ```console // with npm npm install @nait-aits/ui ```
Author: NAIT AITS
Latest version: 0.6.2

## Installation

```console
// with npm
npm install @nait-aits/ui
```

## Usage Example

```javascript
import { AppBar } from "@nait-aits/ui";

const SamplePage = (props: Props) => {
 
  return (
   <>
    <AppBar
      rightContent={<div>Content</div>}
      onBackClick={()=>{}}
      headingText={"This is the heading"}
      isLoading={true}
      backButtonText={"back"}
    />
   </>
  );
};

export default SamplePage;

```
npm package: @naitik/flex-store
Description: A flexible key-value store solution for Node.js projects, offering easy data storage and retrieval
Author: Naitik Patel
Latest version: 1.0.6

# Flex-Store

Flex-Store is a flexible key-value store solution for Node.js projects, offering easy data storage and retrieval.

## Installation

npm i @naitik/flex-store-store

## Usage

            import DB from '@naitik/flex-store' ;
            const db = new DB();
            
            try {
                db.add('user1', { name: 'John', age: 30 });
                console.log('Data added successfully.');
            } catch (error) {
                console.error('Error adding data:', error.message);
            }

            console.log(db.get('user1'))


## Available commands
            db.add(key, value) - Adds a key-value pair to the database
            db.edit(key, value) - Edits a key-value pair in the database
            db.get(key) - Gets a key-value pair from the database based on input
            db.remove(key) - Removes a key-value pair from the database
            db.dump(consolelog) - Returns the database as JSON - consolelog is optional and will also log the output to the console (useful for testing!)
            db.load(json) - Loads a JSON file into the database
            db.export() - Exports the database to database.bzdb
            db.clear() - Clears the database
npm package: @naive-potato-ui/build
Description: A Naive UI component library for Vue 3.
Author: xby020
Latest version: 1.0.20

# @naive-potato-ui/build

> Build tools for Naive Potato UI

# Generate vite config for child packages

# build process

## generate vite config
> generate common vite config by `generateViteConfig` function, which will be used by all child packages;
### plugins
- @vitejs/plugin-vue: for vue single file component;
- 

## build production code and style file
1. run `pnpm --filter ./packages/** build` to build all packages,which mean run `vite build` in each package, generate `dist` folder which contains 'es' and 'umd' production code and style file;
  
## generate dts file
1. using `vue-tsc` to generate dts file for every vue component and ts file in packages, but those dts file generated in root folder, so we need to move them to each individual package folder's dist folder(need to clean up root dist dir first);
2. move all dts file to each individual package folder's dist folder by vite plugin hook, and cause vite build didn't care about child package's `types` dir(if it has), so we need to move types dir to each individual package folder's dist folder too;


## generate new package.json content and replace it
1. now every package has its own dist folder which contains 'es' and 'umd' production code and style file and dts file;
2. generate new package.json content and replace the old one;
   1. name: `@naive-potato-ui` prefix, get package name by folder name, generate kebab-case