open-index/open-npm huggingface dataset:
npm package: @parcellab/eslint-plugin-no-require-assign
Description: Disallow assigning to required bindings
Author: Chia Wei
Latest version: 0.0.3

# eslint-plugin-no-require-assign

Disallow assigning to required bindings

Original author @weiliddat [@parcellab/eslint-config#51](https://github.com/parcelLab/eslint-config/pull/51)

## Installation

You'll first need to install [ESLint](https://eslint.org/):

```sh
npm i eslint --save-dev
```

Next, install `eslint-plugin-no-require-assign`:

```sh
npm install eslint-plugin-no-require-assign --save-dev
```

## Usage

Add `no-require-assign` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:

```json
{
  "plugins": ["no-require-assign"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "no-require-assign/rule-name": 2
  }
}
```

## Supported Rules

- Fill in provided rules here

## Contributing

[Contribution guidelines](CONTRIBUTING.md)
npm package: @parcellab/react-use-umami
Description: React tools for Umami Analytics.
Author: andruschka
Latest version: 2.0.1

# 🥓 react-use-umami
React hooks for [umami analytics](https://umami.is/).  
Track page views and events from React components.

## Install
> React is a peer dependency!
```
$ npm i react-umami-hooks
```

Then you'll need to add the script to the `<head>` section of your page.
* This can be done manually: Follow the instructions on the [umami docs page](https://umami.is/docs/) to add the script to the `<head>` section of your page if you have not already. After this (disable the automatic page view tracking)[https://umami.is/docs/tracker-config] ba adding 
`data-auto-track="false"` to your tracking script so it looks something like this:  
```
<script async defer
  src="http://mywebsite/umami.js"
  data-website-id="94db1cb1-74f4-4a40-ad6c-962362670409"
  data-auto-track="false"
></script>
```
* Or using `registerUmamiScript` function from the package.
```javascript
import React from 'react'
import { registerUmamiScript } from '@parcellab/react-use-umami'

export default function App ({ url, websiteId, dataDomain }) {
  React.useEffect(() => {
    registerUmamiScript(url, websiteId, dataDomain)
  }, [])
  return (
    <>
      <HomePage />
      ...
    </>
  )
}
```
 
 ## Usage
You can now import and use `useTrackView` and `useTrackEvent` from this module:
```javascript
const { React } = require('react')
const useUmami = require('@parcellab/react-use-umami')

const HomePage = (props) => {
  const _trackEvt = useUmami('/') // will fire a page view once
  // call this hook only in the top main component and pass the _track function down where it is needed!

const handleSignupClick = () => {
    _trackEvt('Signup CTA', 'click') // will register a 'click' event with value 'Signup CTA'
    // ...
    _trackEvt('Form submitted') // will register a 'custom' event with value 'Form submitted'
  }

  return (
    <>
      <nav></nav>
      ...
    </>
  )
}

```

### useUmami(url, [referrer], [website_id], [skipPageView]) : function trackEvt
Tracks a page view. Only runs once per rendered component. Use this on the top page components for tracking page views. The **referrer** and **website_id** values are optional. They will default to the page referrer and data-website-id defined by the script. Returns a function for tracking events. If **skipPageView** is true, the initial page view will not be triggered.  

### trackEvt(event_value, [event_type]) : undefined
Tracks a (custom) event. If **event_type** is omitted it will default to 'custom'. Can be called multiple times.

### registerUmamiScript(url, websiteId, dataDomain) : function registerUmamiScript
Adds script with url, websiteId and dataDomain to the header of the html page. Should be triggerd once in the root component (use `useEffect` hook with an empty array as a second argument to trigger once). This can also be done manually without usage of this function. For reference see the docs [umami docs page](https://umami.is/docs/)
npm package: @parcelvoy/js-sdk
Description: Parcelvoy Javascript SDK for collecting events
Author: Chris Anderson
Latest version: 0.1.2

<p align="center">
  <img width="400" alt="Parcelvoy Logo" src=".github/assets/logo-light.png#gh-light-mode-only" />
  <img width="400" alt="Parcelvoy Logo" src=".github/assets/logo-dark.png#gh-dark-mode-only" />
</p>

# Parcelvoy JS SDK

## Installation
To install the SDK, use Yarn, npm, or a script tag:

- npm
```
npm install @parcelvoy/js-sdk
```

- Yarn
```
yarn add @parcelvoy/js-sdk
```

script tag

```
<script src="https://unpkg.com/@parcelvoy/js-sdk/lib/esm/index.js"></script>
```

## Usage
The SDK can be used both on the server or in the web browser. The main difference is that on the Browser the identified user will be cached vs in Node where you'll need to pass in identifiers on every request.

### Initialize
Before using any methods, the library must be initialized with an API key and URL endpoint.

If you aren't accessing the SDK via script tag, start by importing the Parcelvoy SDK:
```typescript

// 
const { Client /** or BrowserClient */ } = require('@parcelvoy/js-sdk')

// Or
import { Client /** or BrowserClient */ } from '@parcelvoy/js-sdk'
```

Then you can initialize the library:
```typescript
// Node
const client = new Client({
    apiKey: "XXX-XXX",
    urlEndpoint: "https://app.parcelvoy.com/api"
})

// Browser
const client = new BrowserClient({
    apiKey: "XXX-XXX",
    urlEndpoint: "https://app.parcelvoy.com/api"
})

// Or global script
Parcelvoy.initialize({
    apiKey: "XXX-XXX",
    urlEndpoint: "https://app.parcelvoy.com/api"
})
```

### Identify
You can handle the user identity of your users by using the `identify` method. This method works in combination to either/or associate a given user to your internal user ID (`external_id`) or to associate attributes (traits) to the user. By default all events and traits are associated with an anonymous ID until a user is identified with an `external_id`. From that point moving forward, all updates to the user and events will be associated to your provider identifier.
```typescript

// Client
client.identify({
    externalId: "XXX-XXX"
    phone: "+1234567890"
    email: "email@email.com"
    traits: {}
})

// Or global script
Parcelvoy.identify({
    externalId: "XXX-XXX"
    phone: "+1234567890"
    email: "email@email.com"
    traits: {}
})
```

### Events
If you want to trigger a journey and list updates off of things a user does within your app, you can pass up those events by using the `track` method.
```typescript

// Client
client.track({
    event: "Tapped Button"
    traits: {
        "Key": "Value"
    }
})

// Or global script
Parcelvoy.track({
    event: "Tapped Button",
    traits: {
        "Key": "Value"
    }
})
```