open-index/open-npm huggingface dataset:
npm package: @marteye/agri-toolkit
Description: TypeScript toolkit for agricultural data parsing and utilities
Author: Marteye
Latest version: 0.1.1

## agri-toolkit

A tiny TypeScript toolkit for farm data. Parse and format livestock ear tags and UK CPH numbers.

### Install

```bash
npm i @marteye/agri-toolkit
```

### Quick start

```ts
import { EarTag, CPH, isValidCPH } from "@marteye/agri-toolkit";

// Ear tags
const tag = EarTag.parse("UK 1234567 89012");
tag.isEartag(); // true
tag.toString(); // "UK 1234567 89012"
tag.toISO24631(); // "1 0 04 00 0 826 1234567 89012"

// Add a fallback country if the tag has only numbers
EarTag.format("123456789012", "UK"); // => "UK 1234567 89012"

// UK CPH (County/Parish/Holding)
isValidCPH("12/345/6789"); // true
const cph = CPH.parse("12/345/6789");
cph.isValid();
cph.region; // "England" | "Wales" | "Scotland" | "Unknown"
cph.details(); // parsed pieces + county/parish names when available
```

### Dev

- **Test**: `npm test`
- **Build**: `npm run build`
- **Node**: >= 18

### License

MIT
npm package: @marteye/studiojs
Description: MartEye Studio JavaScript SDK
Latest version: 1.1.46

# MartEye Studio JavaScript SDK (@marteye/studiojs)

This library is a JavaScript SDK that allows you to easily integrate with MartEye Studio's API. It provides methods to interact with various resources, manage data, and leverage the powerful features offered by MartEye Studio.

## Installation

You can install the library using npm or yarn:

Using npm:

```bash
npm install @marteye/studiojs
```

Using yarn:

```bash
yarn add @marteye/studiojs
```

## Usage

### Importing the Library

Using ES Modules:

```javascript
import StudioJS from "@marteye/studiojs";
```

Or using CommonJS:

```javascript
let StudioJS = require("@marteye/studiojs");
```

### Initializing the SDK

Before using the library, initialize it with your API key. For more information on obtaining an API key, please contact your MartEye representative.

```javascript
let studioClient = StudioJS.init({
  apiKey: "YOUR_API_KEY_HERE",
});
```

## Contributing

Contributions are welcome! Please open an issue or submit a pull request if you have suggestions or improvements.

## License

MIT