# yaml-to-analytics

> A simple utility that helps us define types for the analytics information that goes to [Segment](https://segment.com). We hope you find it useful as well!

Latest version **0.1.0** (published 2019-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install yaml-to-analytics
pnpm add yaml-to-analytics
yarn add yaml-to-analytics
bun add yaml-to-analytics
```

Provides the command `yaml-to-analytics`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-03-15 |
| First published | 2018-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 30.7 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | meeshkan |

## Links

- npm: https://www.npmjs.com/package/yaml-to-analytics
- npm.io page: https://npm.io/package/yaml-to-analytics

## Dependencies (11)

- [tmp](https://npm.io/package/tmp.md) ^0.0.33
- [glob](https://npm.io/package/glob.md) ^7.1.3
- [debug](https://npm.io/package/debug.md) ^4.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.12.0
- [prettier](https://npm.io/package/prettier.md) 1.15.2
- [@types/tmp](https://npm.io/package/@types/tmp.md) ^0.0.33
- [@types/js-yaml](https://npm.io/package/@types/js-yaml.md) ^3.11.2
- [lodash.clonedeep](https://npm.io/package/lodash.clonedeep.md) ^4.5.0
- [topological-sort](https://npm.io/package/topological-sort.md) ^0.3.0
- [json-schema-to-typescript](https://npm.io/package/json-schema-to-typescript.md) ^6.1.0

## Recent versions

- 0.1.0 (latest) — 2019-03-15
- 0.0.10 — 2019-03-15
- 0.0.9 — 2019-03-15
- 0.0.8 — 2018-12-08
- 0.0.7 — 2018-12-08
- 0.0.6 — 2018-12-08
- 0.0.5 — 2018-12-08
- 0.0.4 — 2018-12-08
- 0.0.3 — 2018-12-08
- 0.0.2 — 2018-12-08
- 0.0.1 — 2018-12-08
- 0.0.0 — 2018-12-08

## README

# yaml-to-analytics

A simple utility that helps us define types for the analytics
information that goes to [Segment](https://segment.com).  We hope you find it useful as well!

## Why use this?

If you've ever done something like...

```
sendAnalyticsEvent("user signs in", {
    name: "John",
    time: new Date().toString()
});
// ...
sendAnalyticsEvent("usr sings in", {
    name: "John",
    timestamp: new Date().toString()
});
```

...you know exactly why you need this.

## How to use

```
yarn add -D yaml-to-analytics
```

Then, check out the `example/` directory for a minimum viable kitchen sink example.  Basically, create a bunch of YAML files in [JSON Schema](https://json-schema.org/) format and each one will be turned into a function that returns a [segment](https://segment.com) analytics event for their [Node SDK](https://github.com/segmentio/analytics-node).

---
_Source: https://npm.io/package/yaml-to-analytics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
