open-index/open-npm huggingface dataset:
npm package: @sabuj0338/axios-friday
Description: Friday - a axios based api handling custom class. which has refresh token mechanism configured.
Author: Sabuj Islam
Latest version: 1.4.2

# @sabuj0338/axios-friday
This is an Axios-based customized class `Friday` that appears to be designed for making API requests with authentication and token refresh capabilities.

This library uses `cookie` to store `access_token` and `refresh_token`.

`@sabuj0338/axios-friday` is a TypeScript library for dealing with API requests.

## Installation


```bash
npm install @sabuj0338/axios-friday
```

## Usage

```python
import { Friday } from "@sabuj0338/axios-friday";

# Configure and use

const baseURL = "https://sabuj0338.github.io/portfolio";

const friday = new Friday({ 
    baseURL: baseURL,
    # accessTokenKey: "access_token",
    # refreshTokenKey: "refresh_token",
    # refreshTokenAPI: "/api/refresh",
    # enableRefreshToken: false,
    # enableAccessToken: true,
});

# returns 'AxiosResponse'
const response = await friday.get(new URL(baseURL));

```

## Example of using a class that Extends `Friday`

```python
import { Friday } from "@sabuj0338/axios-friday";
import { AxiosResponse } from "axios";
import Cookies from "js-cookie";
import toast from "react-hot-toast";

const BASE_API_URL = import.meta.env.VITE_BASE_API_URL;
const REFRESH_TOKEN_API = import.meta.env.VITE_REFRESH_TOKEN_API;
const REFRESH_TOKEN_KEY = import.meta.env.VITE_REFRESH_TOKEN_KEY;
const ACCESS_TOKEN_KEY = import.meta.env.VITE_ACCESS_TOKEN_KEY;

class MyFriday extends Friday {
  constructor(baseURL: string = BASE_API_URL) {
    super({
      baseURL: baseURL,
      refreshTokenEndpoint: REFRESH_TOKEN_API,
      accessTokenKey: ACCESS_TOKEN_KEY,
      refreshTokenKey: REFRESH_TOKEN_KEY,
      enableRefreshToken: true,
      enableAccessToken: true,
    });
  }

  override resetTokens(res: AxiosResponse<any, any>) {
    Cookies.set(ACCESS_TOKEN_KEY, res.data.tokens.access.token);
    Cookies.set(REFRESH_TOKEN_KEY, res.data.tokens.refresh.token);
  }

  override throwError(message: string): void {
    toast.error(message);
  }
}

export const friday = new MyFriday();


# returns 'AxiosResponse'
const response = await friday.get(new URL(baseURL));

```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @sabyasachibiswal/validator
Description: Validate input data with rules and customised error messages.
Author: Sabyasachi Biswal
Latest version: 1.0.5

# sabyasachibiswal/validator

Node.js validators - Data validator engine for validating input data / form data, with customisable error messages for each field.

## Getting started


### Install via npm 

```sh
npm install --save @sabyasachibiswal/validator
```

### Import the module

```javascript
var Validator = require("@sabyasachibiswal/validator");
```

### Usage

```javascript

exports.Signup = function(req , res) {    
    
    // Lets assume we have this inputData
    var inputData = {
        name : "Sabyaschi Biswal",
        email : "info@sabyasachibiswal.com",
        password : "my-secret"
    };
    
    // Rules for validations
    var validationRules = {
        name : "required|string",
        email : "required|email",
        password : "required|min:6",
        captcha : "required"
    };
    
    // Optional - Custom messages
    var customMessages = {
        name : {
            required : "Name is required",
            string : "Name must contain only alphabets",
        },
        email : {
            required : "Email is required",
            email : "Email must be a valid email address"
        },
        password : {
            required : "Password is required",
            min : "Password must be minimum 6 characters"
        },
        captcha : {
            required : "Captcha is required"
        }
    };
    
    // Validate
    var validator = new Validator(inputData, validationRules, customMessages).validate();
    
    // Check if validation failed
    if(validator.valid === false){
        // Error
        return res.json({status : "error", errors : validator.getAllErrorsMessages()});
    }else{
        // Create user
        //...
        
        // Return success response
        return res.json({status : "success", message : "Signup successful"});
    }

};



```
npm package: @sacdos/react-mediaquery
Description: A React helper library built upon semantic-ui to allow serving different components to different screens easily on server rendering or in browsers
Author: Caleb I. Lucas
Latest version: 0.2.13

## About
A React helper library built upon semantic-ui to make serving different components to different screens a breeze via server rendering or in browsers. Currently supports Mobile, Tablet and Desktop.

## Usage
This library is only compatible with React.

#### Install
```
npm install @cmdlucas/react-mediaquery
```

#### Example
Say we had a root DOM element we wanted to render different contents to according to screen width change
```
import React from 'react'
import ReactDOM from 'react-dom'
import { MqProvider, MediaQuery, 
    desktopScreen, tabletScreen, mobileScreen 
} from '@cmdlucas/react-mediaquery'

//It is required to use the Provider component as specified below 
//before calling MediaQuery anywhere down the Tree

const Menu = props => {
    return (
        <MqProvider>
            <MediaQuery type={desktopScreen}> 
                <h2> This is a desktop screen </h2>
            </MediaQuery>
            <MediaQuery type={tabletScreen}>
                <h3> This is a tablet screen </h3> 
            </MediaQuery>
            <MediaQuery type={mobileScreen}> 
                <h4> This is a mobile screen </h4> 
            </MediaQuery>
        </MqProvider>
    )
}

ReactDOM.render(<Menu />, document.getElementById("root"))

```

The Provider can be served an initial screen width either by supplying the user agent as seen below or by supplying a function that explicitly returns a specific number

```
//...
import { MqProvider, widthFactory } from 'react-mediaquery'
//...

const MenuA = props => {
    return (
        <MqProvider width={widthFactory(request.userAgent))}>
            //....
        </MqProvider>
    )
}

//This is also valid
const MenuB = props => {
    return (
        <MqProvider width={() => 576}>
            //....
        </MqProvider>
    )
}

//...
```

### Additional knowledge
You can supply other screen types to the MediaQuery component. Just import and use

#### Supported screen types
  - desktopScreen
  - mobileScreen
  - tabletScreen
  - mobileAndTablet
  - desktopAndTablet

## License
MIT
npm package: @sacercode/file-management
Description: Object oriented JavaScript files management helpers
Author: Sacercode
Latest version: 1.0.19

# node-file-management
Set of JS objects to manage files using Node JS

## Installation
```sh
npm install @editide/file-management
```

## Example usage

Watch the [example-usage](./example-usage.mjs) script.

You can execute it using `npm run test`

Otherwise, simply import it like so :
```js
const { ServerFile, ServerFolder } = require("@editide/file-management");
```

You can instanciate a file object using it's exact path with `filePath`
```js
const rootPath = require("./rootPath"); // Returns this project root folder's path
new ServerFile({
    filePath: rootPath + "LICENCE",
});
```

or with serapate fields :
```js
const readmeFile = new ServerFile({
    folderPath: rootPath,
    name: "README",
    extension: "md"
});
```

Then just add a dot to the file object and `Ctrl + Space` to autocomplete to see properties and methods.

## Notes

It may be imperfect, but it does already helps me winning a lot of time.
npm package: @sacercode/react-js-variable-primitives-typed-input
Description: [![Coverage Status](./coverage/badges.svg)](./coverage/index.html) [![Tests](https://img.shields.io/badge/tests-78%20passed-brightgreen.svg)](./coverage/index.html)
Author: Sacercode
Latest version: 0.1.0

# JS Variable Primitives Typed Input

[![Coverage Status](./coverage/badges.svg)](./coverage/index.html)
[![Tests](https://img.shields.io/badge/tests-78%20passed-brightgreen.svg)](./coverage/index.html)

A react component based that shows an bunch of input to represent a javascript variable and it's primitives types.

## 🏗️ Installation
```
yarn add @sacercode/react-js-variable-primitives-types-input

```

Or from GitHub 😺+🐙:


```
npm install git+https://github.com/Sacercode/js-variable-primitives-types-input
```

## ⚙️ Usage and config
```jsx
import React, { useState } from 'react';
import JSVariablePrimitivesTypedInput from '@sacercode/react-js-variable-primitives-types-input'

const MyComponent = () => {
    const [variable, setVariable] = useState();
    const [variableName, setVariableName] = useState();

    return (
        <JSVariablePrimitivesTypedInput
            onCreate={
                (variable, value) => {
                    console.log("variable : ", variable);
                    console.log("value : ", value);
                }
            }
            varName={variableName}
            onVariableNameBlur={(old, newValue) => setVariableName(newValue)}
            displayVariableName={true}
            displayVariableDeclarationTypes={true}
            
            value={variable}
            onVariableBlur={(old, newValue) => setVariable(newValue)}
            readonly={false}
            
            typeInput={"select"}
            allowTypeChange={true}
        />
    )
}
```

### API

The `js-variable-primitives-types-input` allows using ref to access some methods and therefore, related data :

- `value()` : Returns the current value of the variable
- `type()` : Returns the current type of the variable
- `valueCode()` : Returns the variable value as code
- `getVariableAsCode()` : Returns the variable as code

Example : 
```jsx
import React, { useRef } from 'react';
const MyComponent = () => {
    const varRef = useRef(null);

    useEffect(
        () => {
            if(varRef.current) {
                console.log("value : %o", varRef.current.value());
                console.log("type : %o", varRef.current.type());
                console.log("valueCode : %o", varRef.current.valueCode());
                console.log("getVariableAsCode : %o", varRef.current.getVariableAsCode());
            }
        }, []
    );

    return (
        <JSVariablePrimitivesTypedInput ref="varRef"/>
    );
}
```
npm package: @sacfiscal/fiscaljs
Description: Biblioteca para cálculos fiscais na NFe/NFCe
Author: Cristiano Junior
Latest version: 1.0.6

# Calculadora Tributária (fiscaljs)

![Build & Publish](https://github.com/sacfiscal/fiscaljs/actions/workflows/npm-publish.yml/badge.svg)

## Índice

-   [Calculadora Tributária (fiscaljs)](#calculadora-tributária-fiscaljs)
    -   [Índice](#índice)
    -   [Sobre o projeto](#sobre-o-projeto)
    -   [Tributações suportadas](#tributações-suportadas)

## Sobre o projeto

Portabilidade da biblioteca [**FiscalNet**](https://github.com/sacfiscal/FiscalNet/tree/master) feita por [**Cristiano Júnior da Cruz**](https://github.com/cristiano-linvix) para TypeScript. Contém as implementações de cálculos tributários para emissão de documentos fiscais eletrônicos no Brasil.

## Tributações suportadas

-   [ICMS](https://pt.wikipedia.org/wiki/Imposto_sobre_Circula%C3%A7%C3%A3o_de_Mercadorias_e_Servi%C3%A7os);
-   [ICMS-ST](<https://www.totvs.com/blog/adequacao-a-legislacao/substituicao-tributaria/#:~:text=A%20Substitui%C3%A7%C3%A3o%20Tribut%C3%A1ria%20(ST)%20%C3%A9,produto%20chegue%20ao%20consumidor%20final.>);
-   [IPI](https://pt.wikipedia.org/wiki/Imposto_sobre_Produtos_Industrializados);
-   [PIS](https://pt.wikipedia.org/wiki/PIS/PASEP);
-   [COFINS](https://pt.wikipedia.org/wiki/Contribui%C3%A7%C3%A3o_para_o_Financiamento_da_Seguridade_Social).

---

## Instalação

```bash
yarn add @sacfiscal/fiscaljs
```

```bash
npm install @sacfiscal/fiscaljs
```

## Utilização

[Exemplos](examples/README.md)

```typescript
import { Icms00, Icms20, Icms90, Icms900 } from "@sacfiscal/fiscaljs";

const icms00 = new Icms00(
    valor_bruto,
    valor_frete,
    valor_seguro,
    valor_outras_despesas,
    ipi_valor,
    valor_desconto_total,
    aliq_icms_proprio,
);

const vBC = icms00.BaseIcmsProprio();
const vICMS = icms00.ValorIcmsProprio();

const icms20 = new Icms20(
    valor_bruto,
    valor_frete,
    valor_seguro,
    valor_outras_despesas,
    ipi_valor,
    valor_desconto_total,
    aliq_icms_proprio,
    aliq_reducao_bc,
);

const vBC = icms20.BaseReduzidaIcmsProprio();
const vICMS = icms20.ValorIcmsProprio();
const vICMSDeson = icms20.ValorIcmsDesonerado();

const icms90 = new Icms90(
    valor_bruto,
    valor_frete,
    valor_seguro,
    valor_outras_despesas,
    valor_desconto_total,
    icms_aliq_proprio,
    icms_aliq_st,
    aliq_mva,
    valor_ipi,
    aliq_reducao_bc,
    aliq_reducao_bc_st,
);
```

## Testes

Você pode rotar os testes unitários com o comando `yarn test` para garantir a integridade da biblioteca.
Os testes ficam dentro das pastas __tests__ em cada implementação.

```bash
yarn test
yarn test:watch
yarn test:watchAll
```


> Você pode ver todas as funções disponíveis nas [interfaces](src/interfaces/) disponíveis para entender as propriedades e funções disponíveis em cada categoria de [ICMS](src/interfaces/icms/categorias.ts), [FCP](src/interfaces/icms/fcp.ts), [IPI](src/interfaces/ipi/index.ts), [PIS](src/interfaces/pis/index.ts) & [COFINS](src/interfaces/cofins/index.ts).

---
npm package: @sach1/hydrangea
Description: Very minimal logger that just logs to the stdout. Will surely add some features to it in the future, but right now as it is it's perfect for my necessities.
Author: sach1
Latest version: 1.0.7

Very minimal logger that just logs to the stdout.
Will surely add some features to it in the future, but right now as it is it's perfect for my necessities.

Note that, rainbowLogs CAN and WILL impact your performance
npm package: @sachahurley/scorpion-ui
Description: A TUI-inspired token-based design system for React with TypeScript support
Latest version: 2.1.0

# Scorpion UI

A token-based design system for React with TypeScript support. Built entirely from design tokens with full light/dark theme support.

## Installation

```bash
npm install scorpion-ui
```

## Quick Start

### 1. Import CSS

Import the design tokens CSS file in your main entry point (e.g., `main.tsx` or `App.tsx`):

```tsx
import 'scorpion-ui/styles'
```

### 2. Setup Tailwind Config

Extend your `tailwind.config.js` with the Scorpion UI preset:

```javascript
module.exports = {
  presets: [require('scorpion-ui/tailwind.preset.js')],
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
    "./node_modules/scorpion-ui/dist/**/*.{js,ts,jsx,tsx}",
  ],
  // ... your other config
}
```

### 3. Wrap Your App with ThemeProvider

```tsx
import { ThemeProvider } from 'scorpion-ui'

function App() {
  return (
    <ThemeProvider>
      {/* Your app */}
    </ThemeProvider>
  )
}
```

### 4. Use Components

```tsx
import { Button, Input, Card } from 'scorpion-ui'

function MyComponent() {
  return (
    <Card>
      <Input placeholder="Enter text" />
      <Button variant="primary">Click me</Button>
    </Card>
  )
}
```

## Available Components

- **Button** - Multiple variants (primary, secondary, ghost, outline, destructive, icon)
- **Input** - Text input with sizes and error states
- **Modal** - Dialog component with backdrop
- **Card** - Container component
- **Badge** - Labels and tags
- **Alert** - Notification messages
- **Avatar** - User profile images
- **Divider** - Visual separators
- **Tooltip** - Hover information
- **Select** - Dropdown select
- **Checkbox** - Checkbox input
- **Radio** - Radio button input
- **Textarea** - Multi-line text input
- **Switch** - Toggle switch
- **Dropdown** - Dropdown menu
- **ThemeToggle** - Light/dark theme switcher

## Design Tokens

All components use CSS variables from the design token system. You can access tokens directly:

```tsx
import { getToken, getTokensForTheme } from 'scorpion-ui'

// Get a specific token value
const primaryColor = getToken('color-primary-500', 'light')

// Get all tokens for a theme
const lightTokens = getTokensForTheme('light')
```

## Theme System

Scorpion UI supports automatic light/dark theme switching. The `ThemeProvider` component uses `next-themes` under the hood and supports:

- System preference detection
- Manual theme switching
- Smooth transitions
- Persistent theme preference

## TypeScript Support

Full TypeScript support with exported types for all components:

```tsx
import { Button, type ButtonProps } from 'scorpion-ui'

const props: ButtonProps = {
  variant: 'primary',
  size: 'large',
}
```

## Styling

Components are built with Tailwind CSS and use design tokens. You can customize styles by:

1. Overriding CSS variables in your own CSS
2. Using Tailwind classes with the token values
3. Extending the Tailwind preset with your own theme

## License

MIT
npm package: @sachamarits/react-excel-renderer
Description: A react library to render and display excel sheets on webpage
Author: Ashish Deshpande
Latest version: 1.1.3

# react-excel-renderer ![](https://img.shields.io/npm/l/react-excel-renderer.svg?style=flat) ![](https://img.shields.io/npm/v/react-excel-renderer.svg?style=flat) ![](https://img.shields.io/npm/dt/react-excel-renderer.svg?style=flat)
A react library to render and display excel sheets on webpage

---

## Demo
* A sample demo can be found - [here](https://ashishd751.github.io/excel-renderer-demo/)
* You can find code for the demo - [here](https://github.com/ashishd751/excel-renderer-demo)

![](https://github.com/ashishd751/excel-renderer-demo/blob/master/public/DemoSample.gif)

## Installation

```
npm install react-excel-renderer --save
```

## Usage
* Import the primary module *ExcelRenderer* to convert sheet data into JSON format. 
* Also import *OutTable* to display the obtained JSON into a HTML Table.
```
import {OutTable, ExcelRenderer} from 'react-excel-renderer';
```
* Place a simple `input` element in the render function of your class and pass an `onChange` handler
```
<input type="file" onChange={this.fileHandler.bind(this)} style={{"padding":"10px"}} />
```
* In the `onChange` handler, invoke the `ExcelRenderer` function and provide file object from the event handler to the `ExcelRenderer` function to obtain JSON data from sheet
```
  fileHandler = (event) => {
    let fileObj = event.target.files[0];

    //just pass the fileObj as parameter
    ExcelRenderer(fileObj, (err, resp) => {
      if(err){
        console.log(err);            
      }
      else{
        this.setState({
          cols: resp.cols,
          rows: resp.rows
        });
      }
    });               

  }
```
* Use the OutTable component to render obtained JSON data into HTML table, and provide classnames as props to make table look alike an Excel Sheet
```
<OutTable data={this.state.rows} columns={this.state.cols} tableClassName="ExcelTable2007" tableHeaderRowClass="heading" />
```
* To make this table look more like an excel sheet, follow this article - [Quick CSS Tools to make your web page tables to look just like excel](https://www.cogniview.com/articles-resources/quick-css-tools-for-making-your-web-tables-look-just-like-excel)


**Note:** Once the JSON data is obatined, you can also use other options to render them instead of the OutTable component. For example, [CanvasDataGrid](https://github.com/TonyGermaneri/canvas-datagrid) provides various features to render tabular data.


## Built With
* [SheetJS](https://github.com/SheetJS/js-xlsx) - The web page sheet framework used


## Authors
**Ashish Deshpande** - *Initial work* - [Ashish's Github Profile](https://github.com/ashishd751)

## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/ashishd751/react-excel-renderer/blob/master/LICENSE) file for details

## Acknowledgments
* Special shout out to the guys at **Sheet JS** for developing the parent library
* High gratitude towards Bernard Bado to help me publish my first npm package
npm package: @sachetacharya/ngx-toaster
Description: A modern, lightweight toast notification library for Angular 19+ applications
Author: Sachet Acharya
Latest version: 0.0.2

# NgxToaster

A modern, lightweight toast notification library for Angular 19+ applications.

## Features

- 🚀 Built with Angular 19's new signal-based architecture
- 🎯 Multiple toast positions (top-right, top-left, etc.)
- 🌈 Different toast types (success, error, warning, info)
- ⏱️ Configurable durations
- 🖱️ Dismissible toasts
- 🔄 Smooth animations using Angular animations
- 🧩 Standalone components ready for Angular's future

## Installation

```bash
npm install @sachetacharya/ngx-toaster --save
```

## Usage

### Import the module in your app

```typescript
// app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideAnimations } from '@angular/platform-browser/animations';

export const appConfig: ApplicationConfig = {
  providers: [
    provideAnimations()
    // other providers...
  ]
};
```

### Using the ToasterService

```typescript
import { Component, inject } from '@angular/core';
import { ToasterService } from 'ngx-toaster';

@Component({
  selector: 'app-root',
  template: `
    <button (click)="showToast()">Show Toast</button>
  `
})
export class AppComponent {
  private toaster = inject(ToasterService);

  showToast() {
    this.toaster.show({
      message: 'Operation completed successfully!',
      type: 'success',
      duration: 3000,
      position: 'top-right',
      dismissible: true
    });
  }
}
```

### API

#### ToasterService

The main service for showing toasts.

- **show(config: ToastConfig): string** - Shows a toast notification and returns the toast ID
- **remove(id: string): void** - Removes a specific toast by ID
- **clearAll(): void** - Removes all active toasts

#### ToastConfig

Interface for configuring toast notifications:

```typescript
export interface ToastConfig {
  message: string;         // Toast message
  type?: ToastType;        // 'success' | 'error' | 'warning' | 'info'
  duration?: number;       // Duration in ms (default: 3000, 0 = no auto-dismiss)
  position?: ToastPosition;// Position on screen (default: 'top-right')
  dismissible?: boolean;   // Can be dismissed by user (default: true)
}
```

#### ToastPosition

Available positions for toast notifications:

- `'top-right'` (default)
- `'top-left'`
- `'bottom-right'`
- `'bottom-left'`
- `'top-center'`
- `'bottom-center'`

## Demo Component

This library includes a demo component that you can use to test the toasts:

```typescript
import { Component } from '@angular/core';
import { ToasterDemoComponent } from 'ngx-toaster';

@Component({
  selector: 'app-root',
  template: `
    <toast-demo></toast-demo>
  `,
  standalone: true,
  imports: [ToasterDemoComponent]
})
export class AppComponent {}
```

## License

MIT