open-index/open-npm huggingface dataset:
npm package: @sinaghaffari/react-router-5
Description: Declarative routing for React
Author: React Training
Latest version: 1.1.2-rc.1

# react-router

Declarative routing for [React](https://facebook.github.io/react).

## Installation

Using [npm](https://www.npmjs.com/):

    $ npm install --save react-router

**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency.

Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:

```js
// using ES6 modules
import { Router, Route, Switch } from "react-router";

// using CommonJS modules
var Router = require("react-router").Router;
var Route = require("react-router").Route;
var Switch = require("react-router").Switch;
```

The UMD build is also available on [unpkg](https://unpkg.com):

```html
<script src="https://unpkg.com/react-router/umd/react-router.min.js"></script>
```

You can find the library on `window.ReactRouter`.

## Issues

If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues).

## Credits

React Router is built and maintained by [React Training](https://reacttraining.com).
npm package: @sinaghaffari/react-router-dom-5
Description: DOM bindings for React Router
Author: React Training
Latest version: 1.1.2-rc.1

# react-router-dom

DOM bindings for [React Router](https://reacttraining.com/react-router).

## Installation

Using [npm](https://www.npmjs.com/):

    $ npm install --save react-router-dom

Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:

```js
// using ES6 modules
import { BrowserRouter, Route, Link } from "react-router-dom";

// using CommonJS modules
const BrowserRouter = require("react-router-dom").BrowserRouter;
const Route = require("react-router-dom").Route;
const Link = require("react-router-dom").Link;
```

The UMD build is also available on [unpkg](https://unpkg.com):

```html
<script src="https://unpkg.com/react-router-dom/umd/react-router-dom.min.js"></script>
```

You can find the library on `window.ReactRouterDOM`.

## Issues

If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues).

## Credits

React Router is built and maintained by [React Training](https://reacttraining.com).
npm package: @sinakhx/real-type
Description: get real type of javascript's built-in data structures
Author: Sina Khodabandehloo
Latest version: 1.0.2

# **@sinakhx/real-type**
![npm](https://img.shields.io/npm/v/@sinakhx/real-type?color=%239f9f9f&style=flat-square)
![license](https://img.shields.io/npm/l/@sinakhx/real-type?color=red&style=flat-square)
![tests](https://img.shields.io/badge/tests-100%25-green?style=flat-square)
![types](https://img.shields.io/npm/types/@sinakhx/real-type?style=flat-square)

get real type of JavaScript's built-in data structures

## **Why?**
JavaScript's `typeof` operator is a joke.

```js
typeof null       // "object"
typeof {}         // "object"
typeof []         // "object"
typeof new Date() // "object"
```

in order to overcome such ambiguity, people use the following way to be more specific:

```js
Object.prototype.toString.call(new Date()) // "[object Date]"
```

which is far more better, but still has got it's own limitations:

```js
Object.prototype.toString.call(NaN) // "[object Number]"
Object.prototype.toString.call(class Foo{}) // "[object Function]"
```

if you find it silly to treat `NaN` as `number` or classes as functions or even using `Object.prototype.toString.call` to get an array-like string, you can use `@sinakhx/real-type` instead:

```js
realTypeOf(null)        // "Null"
realTypeOf({})          // "Object"
realTypeOf([])          // "Array"
realTypeOf(new Date())  // "Date"
realTypeOf(NaN)         // "NaN"
realTypeOf(class Foo{}) // "Class"
realTypeOf(async () => {}) // "AsyncFunction"
realTypeOf(new WeakMap()) // "WeakMap"
// ...
```

## **Installation**

```bash
npm install @sinakhx/real-type
# or
yarn add @sinakhx/real-type
```

## **Usage**

```js
import realTypeOf from '@sinakhx/real-type';
// or if you are using commonjs:
const realTypeOf = require('@sinakhx/real-type/dist/index.cjs').default;

const customType = realTypeOf(new URL('http://example.com'));
console.log(customType); // "URL"
```

____________________________________
### **Want More Examples?**
see the [tests folder][tests-url] for more detailed examples.

____________________________________
### **Contributing**
Please feel free to open an issue or create a pull request to add a new feature or fix a bug. (see [contributing][contribution-url] for more details)

____________________________________

## **License**

The [MIT License][license-url] (MIT)

&copy; 2022 Sina Khodabandehloo

[tests-url]: https://github.com/Sinakhx/real-type/tree/main/__tests__/
[contribution-url]:  https://github.com/Sinakhx/real-type/blob/main/CONTRIBUTING.md
[changelog-url]:  https://github.com/Sinakhx/real-type/blob/main/CHANGELOG.md
[license-url]:  https://github.com/Sinakhx/real-type/blob/main/LICENSE
npm package: @sinanakkoyun/lame
Description: (TS) NodeJS native bindings to libmp3lame & libmpg123.
Author: Sinan Akkoyun
Latest version: 1.2.5

node-lame
=========
### NodeJS native bindings to libmp3lame & libmpg123
[![Build Status](https://travis-ci.org/TooTallNate/node-lame.svg?branch=master)](https://travis-ci.org/TooTallNate/node-lame)

For all your async streaming MP3 encoding/decoding needs, there's `node-lame`!
This module hooks into libmp3lame, the library that the `lame` command uses, to
provide `Encoder` and `Decoder` streams to NodeJS.


Installation
------------

`node-lame` comes bundled with its own copy of `libmp3lame` and `libmpg123`, so
there's no need to have them installed on your system.

Simply compile and install `node-lame` using `npm`:

``` bash
$ npm install lame
```


Example
-------

Here's an example of using `node-lame` to encode some raw PCM data coming from
`process.stdin` to an MP3 file that gets piped to `process.stdout`:

``` javascript
var lame = require('lame');

// create the Encoder instance
var encoder = new lame.Encoder({
  // input
  channels: 2,        // 2 channels (left and right)
  bitDepth: 16,       // 16-bit samples
  sampleRate: 44100,  // 44,100 Hz sample rate

  // output
  bitRate: 128,
  outSampleRate: 22050,
  mode: lame.STEREO // STEREO (default), JOINTSTEREO, DUALCHANNEL or MONO
});

// raw PCM data from stdin gets piped into the encoder
process.stdin.pipe(encoder);

// the generated MP3 file gets piped to stdout
encoder.pipe(process.stdout);
```

See the `examples` directory for some more example code.

API
---

### Decoder class

The `Decoder` class is a `Stream` subclass that accepts MP3 data written to it,
and outputs raw PCM data. It also emits a `"format"` event when the format of
the MP3 file is determined (usually right at the beginning).

### Encoder class

The `Encoder` class is a `Stream` subclass that accepts raw PCM data written to
it, and outputs a valid MP3 file. You must specify the PCM data format when
creating the encoder instance. Only 16-bit signed samples are currently
supported (rescale before passing to the encoder if necessary)...
npm package: @sinanmtl/release-manager
Description: Prepare release on your terminal
Author: Sinan Mutlu
Latest version: 0.1.4

# Release Manager
Prepare your release with on a new branch. Then merge to your production branch. That's all you have to do!

## Quick Start

Install `@sinanmtl/release-manager`

```bash
npm install -g @sinanmtl/release-manager
```

Move your project directory, run command and follow instructions
```bash
cd my_project_dir
release-manager
```
npm package: @sinansk/caseui
Description: Made with create-react-library
Author: sinansk
Latest version: 1.0.0

# caseui

> Made with create-react-library

[![NPM](https://img.shields.io/npm/v/caseui.svg)](https://www.npmjs.com/package/caseui) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save caseui
```

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from 'caseui'
import 'caseui/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [sinansk](https://github.com/sinansk)
npm package: @sinaptik/pandino-client-sdk
Description: Pandino SDK for client-side tracking and analytics
Latest version: 0.3.4

# Pandino SDK

TypeScript/JavaScript SDK for Pandino email marketing automation platform.

## Installation

```bash
yarn add @sinaptik/pandino-client-sdk
# or
npm install @sinaptik/pandino-client-sdk
```

## Usage

```typescript
import PandinoSDK from "@sinaptik/pandino-client-sdk";

// Initialize with default settings (automatic page view tracking enabled)
pandino = await PandinoClientSDK.create("your-api-key");

// Track an event
pandino.track("page_viewed", { page: "/home" });

// Identify a user
pandino.identify("user123");

// Update user properties
pandino.updateUser({
  email: "user@example.com",
  name: "John Doe",
  plan: "premium",
  lastLogin: new Date(),
});

// Reset sdk on logout
pandino.reset();
```

## Automatic page view tracking

By default, the SDK automatically tracks page views:

- On initial page load
- On navigation using the History API (pushState, replaceState)
- On page navigation using the browser back/forward buttons
- When client-side routing changes the URL without using History API

Each page view event includes:

```typescript
{
  url: "https://example.com/page",  // full URL
  path: "/page",                    // pathname
  title: "Page Title",              // document title
  referrer: "https://google.com",   // referrer if available
  search: "?query=value",           // URL search parameters if any
  hash: "#section",                 // URL hash if any
}
```

To control automatic page view tracking:

```typescript
// Disable page view tracking
pandino.disablePageViewTracking();

// Re-enable page view tracking
pandino.enablePageViewTracking();
```

## API Reference

### track(eventName: string, properties?: Record<string, any>)

Track an event for the current user with optional properties.

### identify(distinctId: string)

Identify a user with a unique identifier.

### updateUser(properties: Record<string, any>)

Update properties for the current user.

### disablePageViewTracking()

Disable automatic page view tracking.

### enablePageViewTracking()

Enable automatic page view tracking.

### reset()

Reset the SDK instance to its initial state. This includes clearing session and identity information and reinitializing page view tracking if it is enabled.

```typescript
// Reset the SDK instance
pandino.reset();
```
npm package: @sinaptik/retein-client-sdk
Description: Retein SDK for client-side tracking and analytics
Latest version: 0.1.2

# Retein SDK

TypeScript/JavaScript SDK for Retein email marketing automation platform.

## Installation

```bash
yarn add @sinaptik/retein-client-sdk
# or
npm install @sinaptik/retein-client-sdk
```

## Usage

```typescript
import ReteinSDK from "@sinaptik/retein-client-sdk";

// Initialize with default settings (automatic page view tracking enabled)
reteinClient = await ReteinClientSDK.create("your-api-key");

// Track an event
retein.track("page_viewed", { page: "/home" });

// Identify a user
retein.identify("user123");

// Update user properties
retein.updateUser({
  email: "user@example.com",
  name: "John Doe",
  plan: "premium",
  lastLogin: new Date(),
});
```

## Automatic page view tracking

By default, the SDK automatically tracks page views:

- On initial page load
- On navigation using the History API (pushState, replaceState)
- On page navigation using the browser back/forward buttons
- When client-side routing changes the URL without using History API

Each page view event includes:

```typescript
{
  url: "https://example.com/page",  // full URL
  path: "/page",                    // pathname
  title: "Page Title",              // document title
  referrer: "https://google.com",   // referrer if available
  search: "?query=value",           // URL search parameters if any
  hash: "#section",                 // URL hash if any
}
```

To control automatic page view tracking:

```typescript
// Disable page view tracking
retein.disablePageViewTracking();

// Re-enable page view tracking
retein.enablePageViewTracking();
```

## API Reference

### track(eventName: string, properties?: Record<string, any>)

Track an event for the current user with optional properties.

### identify(distinctId: string)

Identify a user with a unique identifier.

### updateUser(properties: Record<string, any>)

Update properties for the current user.

### disablePageViewTracking()

Disable automatic page view tracking.

### enablePageViewTracking()

Enable automatic page view tracking.

### reset()

Reset the SDK instance to its initial state. This includes clearing session and identity information and reinitializing page view tracking if it is enabled.

```typescript
// Reset the SDK instance
retein.reset();
```
npm package: @sinaptik/retein-sdk
Description: Retein Node.js SDK for event-based email marketing automation.
Author: Sinaptik
Latest version: 0.1.0

# Retein Node.js SDK

Retein is an event-based email marketing automation SDK for Node.js applications. This SDK allows you to easily integrate Retein's features into your Node.js projects.

## Installation

To install the Retein SDK, you can use npm or yarn:

```bash
# Using npm
npm install @sinaptik/retein-sdk

# Using yarn
yarn add @sinaptik/retein-sdk
```

## Usage

Here's a basic example of how to use the Retein SDK in your Node.js application:

```javascript
// Import the ReteinSDK
import { ReteinSDK } from "@sinaptik/retein-sdk";

// Function to run the example
async function runExample() {
  try {
    // Initialize the SDK
    const sdk = await ReteinSDK.create("your-public-key", { verbose: true });

    // Identify a user
    await sdk.identify("unique-distinct-id");

    // Identify a user with IP address and user_agent from user request on server.
    await sdk.identify("unique-distinct-id", {
      ip_address: "127.0.0.1",
      user_agent:
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
    });

    // Update user properties
    await sdk.updateUser({
      email: "user@example.com",
      name: "John Doe",
      age: 30,
    });

    // Track an event
    await sdk.track("custom_event", { plan_id: "Plan ID" });

    console.log("Example run successfully");
  } catch (error) {
    console.error("Error running example:", error);
  }
}

// Execute the example
runExample();
```

Here's an example of using existing session of user based on distinct id:

```javascript
// Import the ReteinSDK
import { ReteinSDK } from "@sinaptik/retein-sdk";

// Function to run the example
async function runExample() {
  try {
    // Initialize the SDK
    const sdk = await ReteinSDK.create("your-public-key", { verbose: true });

    // Use existing session of user based on distinct id
    // List last sessions returns last five sessions
    const sessions = await sdk.listLastSessions("unique-distinct-id");
    await sdk.identify("unique-distinct-id", {
      session_id: sessions[0].id, // Use the last session id
    });

    // Update user properties
    await sdk.updateUser({
      email: "user@example.com",
      name: "John Doe",
      age: 30,
    });

    // Track an event
    await sdk.track("custom_event", { plan_id: "Plan ID" });

    console.log("Example run successfully");
  } catch (error) {
    console.error("Error running example:", error);
  }
}

// Execute the example
runExample();
```

## API Reference

### `ReteinSDK.create(public_key, options)`

- **public_key**: Your Retein public API key.
- **options**: Optional configuration settings.

### `identify(distinctId)`

Identifies a user with a unique distinct ID.

### `updateUser(properties)`

Updates user properties such as email, name, and other custom attributes.

### `track(eventName, properties)`

Tracks a custom event with specified properties.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
npm package: @sinasabet81/merkletreejs
Description: Small merkle tree library for JS
Latest version: 1.0.6

# merkletreejs

[![npm (scoped)](https://img.shields.io/npm/v/@sinasabet81/merkletreejs.svg)](https://www.npmjs.com/package/@sinasabet81/merkletreejs)
[![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/@sinasabet81/merkletreejs.svg)](https://www.npmjs.com/package/@sinasabet81/merkletreejs)

## Usage
```js
// the basics
const MerkleTree = require('@sinasabet81/merkletreejs');

const crypto = require('crypto');

const sha256 = preimage =>
  crypto
    .createHash('sha256')
    .update(preimage)
    .digest();

const preimages = ['hello', 'world'];
const leaves = preimages.map(sha256);

const merkleTree = new MerkleTree(leaves, sha256);

console.log(merkleTree.getPrettyRoot()); // '7305db9b2abccd706c256db3d97e5ff48d677cfe4d3a5904afb7da0e3950e1e2'

console.log(merkleTree.getPrettyLayers());
// [ [ '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824',
//     '486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7' ],
//   [ '7305db9b2abccd706c256db3d97e5ff48d677cfe4d3a5904afb7da0e3950e1e2' ] ]

console.log(merkleTree.getPrettyProof(leaves[0]));
// { siblings:
//   [ { siblingPosition: 'right',
//       siblingHash:
//        '486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7' } ],
//  leaf:
//   '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824',
//  root:
//   '7305db9b2abccd706c256db3d97e5ff48d677cfe4d3a5904afb7da0e3950e1e2' }

const proof = merkleTree.getProof(leaves[0]);
const result = merkleTree.verifyProof(proof);
console.log(result); // true
```

## Notes
Naive use of this library could be vulerable to a second preimage attack; see [this blog post](https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/) or [this wikipedia section](https://en.wikipedia.org/wiki/Merkle_tree#Second_preimage_attack) for more info. This attack can be avoided by using a separate hash function for your leaves and inner nodes. An example copied from the test file:
```js
const leafHashFunction = inputBuffer =>
  sha256(Buffer.concat([Buffer.alloc(1, 0), inputBuffer]));
const innerHashFunction = inputBuffer =>
  sha256(Buffer.concat([Buffer.alloc(1, 1), inputBuffer]));

const tree1Preimages = ['hello', 'world', 'foo', 'bar'].map(
  Buffer.from,
);
const tree1Leaves = tree1Preimages.map(leafHashFunction);
const tree1 = new MerkleTree(tree1Leaves, innerHashFunction);
const tree1Root = tree1.getRoot();

const tree2Preimages = [
  Buffer.concat([tree1Leaves[0], tree1Leaves[1]]),
  Buffer.concat([tree1Leaves[2], tree1Leaves[3]]),
];
const tree2Leaves = tree2Preimages.map(leafHashFunction);
const tree2 = new MerkleTree(tree2Leaves, innerHashFunction);
const tree2Root = tree2.getRoot();

expect(tree1Root.equals(tree2Root)).toBeFalsy();
```