open-index/open-npm huggingface dataset:
npm package: @orderprotection/design-tokens
Description: Add design tokens so that they can be versioned
Author: Ethan Wolz
Latest version: 1.5.0

## Tokens

This repo holds the design configuration for Order Protection design elements. Being in a separate repo
allows us to version the tokens so that we don't accidentally break the design of a consumer.

### How to use

```bash
npm -i --save-dev @orderprotection/design-tokens
```

```javascript
const { Colors, FontFamily } = require('@orderprotection/design-tokens')
```
npm package: @orderprotection/prettier
Description: Prettier configuration for orderprotection code bases
Latest version: 1.0.1

# @orderprotection/prettier

### How to use

If you don't require any customization to this configuration you can utilize your `package.json`


```json
{
  "name": "some-awesome-lib",
  "version": "1337",
  "prettier": "@orderprotection/prettier"
}
```

if you do want to customize the config, you can extend by creating a `prettierrc.js` file as such

```javascript
module.exports = {
  ...require('@orderprotection/prettier')
}
```
npm package: @orderprotection/tailwind
Description: Tailwind configuration for Order Protection
Author: Ethan Wolz
Latest version: 1.2.1

## Order Protection Tailwind

This is the shared configuration for tailwind used by Order Protection projects.

### How to use

```bash
npm -i -D @orderprotection/tailwind
```

in your tailwind.config.js you can just do the following

```javascript
// tailwind.config.js

module.exports = require('@orderprotection/tailwind')
```
npm package: @orderprotection/utils
Description: Utilities used to support the widget
Author: OrderProtection
Latest version: 1.1.16

# OrderProtection Utils

These OrderProtection utilities are available for custom use cases. This package exposes our price calculation based on the cart total

### Notes
- When passing in the cart total, pass in the total without the cost of OrderProtection. Also only pass the total of the items that require shipping.
- The calculation will return `null` if there is no suitable variant with the given subtotal.
- Pass all subtotals as pennies. e.g ($1.00 === 100)

### Usage

```typescript
import { getClosestVariant } from '@orderprotection/utils'

(async function init() {
  const variant = await getClosestVariant(
    "orderprotection.myshopify.com", // replace with your orderprotection store url
    5000 // subtotal
  )

  if (!variant) {
    // recommended to remove widget and OrderProtection from the cart
    return
  }

  //
  const { id, sku, price } = variant
  // do something with the variant
  // ...
}())
```

<!-- Force change -->