open-index/open-npm huggingface dataset:
npm package: @netlifedesign/hdir-stylesheet
Description: This is a NPM package containing the HDIR stylesheet. https://www.npmjs.com/package/@netlifedesign/hdir-stylesheet
Latest version: 1.0.0

# HDIR stylesheet

This is a NPM package containing the HDIR stylesheet.
https://www.npmjs.com/package/@netlifedesign/hdir-stylesheet

## Installation

```bash
npm install @netlifedesign/hdir-stylesheet
```

## Usage

### HDIR complete stylesheet

```javascript
import '@netlifedesign/hdir-stylesheet/styles/App.css';
```

### Basic version of stylesheet containing theme, but without components

```javascript
import '@netlifedesign/hdir-stylesheet/styles/Basic.css';
```

### Helfo complete stylesheet

```javascript
import '@netlifedesign/hdir-stylesheet/styles/Helfo.css';
```
npm package: @netlifedesign/how-much-is-x-co2
Description: A collection of methods to describe and compare X kilograms of CO2
Latest version: 1.0.1

# how-much-is-x-co2
A collection of methods to describe and compare x kilograms of CO2

## Usage

* Install with `npm install tone`
* Import methods with `import { CO2ToKmTraveledByCarAlone, CO2ToKmTraveledByTrainPerPassenger } from "@netlifedesign/how-much-is-x-co2";`

## Methods

All methods take a kgCO2 value and return a corresponding unit described in the method name.

* CO2ToKmTraveledByCoach(kgCO2)
* CO2ToKmTraveledByScooter(kgCO2)
* CO2ToKmTraveledByPlanePerPassenger(kgCO2)
* CO2ToKmTraveledByTrainPerPassenger(kgCO2)
* CO2ToKmTraveledByCarAlone(kgCO2)
* CO2ToKgProducedBeefFromCattleProducingBeefButNotDairy(kgCO2)
* CO2ToKgProducedBeefFromCattleProducingBothBeefAndDairy(kgCO2)
* CO2ToLitresProducedMilk(kgCO2)
* CO2ToHectaresRainforest(kgCO2)
* CO2ToSquareMetersRainforest(kgCO2)
* CO2ToRainforestTrees(kgCO2)
* CO2ToJeans(kgCO2)
npm package: @netlify-tools/core
Description: core package for netlify-tools utilities
Author: Jorge Suárez
Latest version: 0.1.2

# CORE

[![Version](https://img.shields.io/npm/v/@netlify-tools/core.svg)](https://npmjs.org/package/@netlify-tools/core)
[![License](https://img.shields.io/npm/l/@netlify-tools/core.svg)](https://github.com/jorgesuarezch/netlify-tools/blob/master/packages/cli/package.json)

Common code used by netlify tools packages
npm package: @netlify/activity-hub
Description: To keep track of activity across multiple Netlify properties, we need a centralized place where we can store activity.
Author: Jason Lengstorf
Latest version: 1.1.2

# Netlify User Activity Aggregation

To keep track of activity across multiple Netlify properties, we need a centralized place where we can store activity.

This activity is used to track progress (e.g. how much of an educational resource has been completed), determine whether someone has completed the steps to earn a community badge or other bonuses, benefits, or bragging rights.

This module is a write-only helper that makes sending activity data to the central service as painless as possible.

## Installation

```sh
npm i @netlify/activity-hub
```

## Usage

This app assumes you’ve already authenticated the user and that you have their Netlify user ID. If you need to get this, you can use [Netlify OAuth][oauth] and the [Netlify API][api] to retrieve it.

```js
import netlifyActivityHub from '@netlify/activity-hub';

// this is pseudo-code; your app needs to provide the user object
const user = getNetlifyUser()

const sendActivity = netlifyActivityHub({  
  userId: user.id,
  app: "your-app-name", // use the same app name everywhere in your app
});

// whenever you want to send activity, call `sendActivity`
document.querySelector('button').addEventListener('click', () => {
  sendActivity('button-click', {
    page: window.location.pathname,
  })
});
```

## API

### `netlifyActivityHub`

The main function exported by `@netlify/activity-hub` accepts global config and returns a function that will send activity to the Activity Hub.

```js
import netlifyActivityHub from '@netlify/activity-hub';

// see the next section for the config object’s shape
const sendActivity = netlifyActivityHub(config);
```

| property | type     | description                                                                |
| -------- | -------- | -------------------------------------------------------------------------- |
| `userId` | `string` | a Netlify user ID, as returned from the [Netlify API][api]                 |
| `app`    | `string` | a unique identifier for your app. this can be used to group activity later |

### `sendActivity`

The function returned from `netlifyActivityHub` accepts an event type as a string, and an object full of arbitrary data to track whatever details you want about the activity.

```js
sendActivity(type, data);
```

| property | type     | description                                                                |
| -------- | -------- | -------------------------------------------------------------------------- |
| `type`   | `string` | any string to identify the activity type (e.g. `start-playback`) |
| `data`   | `object` | any `JSON.stringify`-able data in an object that can be attached to the activity |

**NOTE:** don’t store any personally identifying data in the `data` object

[api]: https://open-api.netlify.com/#operation/getCurrentUser
[oauth]: https://github.com/netlify-labs/oauth-example
npm package: @netlify/aws-lambda-compat
Description: AWS Lambda compatibility wrapper for Netlify Functions
Author: Netlify Inc.
Latest version: 1.0.0

[![Build](https://github.com/netlify/primitives/workflows/Build/badge.svg)](https://github.com/netlify/primitives/actions)
[![Node](https://img.shields.io/node/v/@netlify/aws-lambda-compat.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/aws-lambda-compat)

# @netlify/aws-lambda-compat

AWS Lambda compatibility wrapper for Netlify Functions. Lets you author Netlify Functions using the AWS Lambda handler
signature.

## Installation

```shell
npm install @netlify/aws-lambda-compat
```

## Usage

Wrap your Lambda-style handler with `withLambda` and export the result as your Netlify Function:

```ts
import { withLambda } from '@netlify/aws-lambda-compat'
import type { HandlerEvent, HandlerContext, HandlerResponse } from '@netlify/aws-lambda-compat'

export default withLambda(async (event: HandlerEvent, context: HandlerContext): Promise<HandlerResponse> => {
  const name = event.queryStringParameters?.name ?? 'World'

  return {
    statusCode: 200,
    headers: { 'content-type': 'application/json' },
    body: JSON.stringify({ message: `Hello, ${name}!` }),
  }
})
```

## How it works

`withLambda` converts between the two function signatures:

1. Incoming `Request` is converted to a Lambda `HandlerEvent` (URL, headers, query string, body with automatic base64
   encoding for binary payloads)
2. The Netlify `Context` is mapped to a `HandlerContext` with sensible defaults for AWS-specific fields
3. The `HandlerResponse` returned by your handler is converted back to a web-standard `Response`

## TypeScript types

The package exports the following AWS Lambda-compatible types:

- `Handler`
- `HandlerCallback`
- `HandlerContext`
- `HandlerEvent`
- `HandlerResponse`

Additionally, the package exports:

- `LambdaHandler` — the type of the handler function passed to `withLambda`

## Contributors

Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) for instructions on how to set up and work on this repository.
Thanks for contributing!