# moti-make-sign

> Generate test variable speed sign data.

Latest version **2.1.1** (published 2020-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install moti-make-sign
pnpm add moti-make-sign
yarn add moti-make-sign
bun add moti-make-sign
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2020-04-18 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jamie Popkin |
| Maintainers | popkinj |

## Links

- npm: https://www.npmjs.com/package/moti-make-sign
- Repository: https://github.com/popkinj/moti-make-sign
- Homepage: https://github.com/popkinj/moti-make-sign#readme
- Issues: https://github.com/popkinj/moti-make-sign/issues
- npm.io page: https://npm.io/package/moti-make-sign

## Dependencies (3)

- [moment](https://npm.io/package/moment.md) ^2.24.0
- [livescript](https://npm.io/package/livescript.md) ^1.6.0
- [uuid-random](https://npm.io/package/uuid-random.md) ^1.3.0

## Recent versions

- 2.1.1 (latest) — 2020-04-18
- 2.1.0 — 2020-04-18
- 2.0.2 — 2020-04-07
- 2.0.1 — 2020-03-27
- 2.0.0 — 2020-03-24
- 1.0.8 — 2019-06-05
- 1.0.7 — 2019-06-05
- 1.0.6 — 2019-06-05
- 1.0.5 — 2019-05-29
- 1.0.4 — 2019-05-29
- 1.0.3 — 2019-05-29
- 1.0.2 — 2019-05-29
- 1.0.1 — 2019-05-28
- 1.0.0 — 2019-05-28

## README

# MOTI-MAKE-SIGN

## Install
```
npm i moti-make-sign
```

## Creating data for incremental sign updates *v1.5*
1. segmentId: random # between <1-100>
1. postedSpeed: random # between <50 60 70 80 90 100>
1. postedDate: "Current time"
1. status: "Operational"
1. header: {object}

The header object can contain any of the following:
```javascript
  {
    fromBusinessSystemName: 'Big Business',
    fromBusinessSystemVersion: 'version 2',
    fromEnvironment: 'DEV',
    targetEnvironment: 'DEV',
    messageSchemaVersion: 'version 1.5.0',
    messageSendDateTime: '2020-03-22T23:05:46Z',
    messageUuid: 'd33a9e93-8fce-4dd0-84a0-54e9e1606bbc'
  }
```

You can pass in additional parameters.
```javascript
const options = {
  segmentId: 30,
  postedSpeed: 100,
  direction: "North",
  historySize: 100
  header: {
    fromEnvironment: 'PROD'
  }
}

const sign = makeSign.create.inc(options);
```

## Creating data for incremental sign updates *v1.0*

You can create an incremental sign update with minimal attribution. This will contain only four variables.
1. segmentId: random # between <1-100>
1. postedSpeed: random # between <50 60 70 80 90 100>
1. postedDate: "Current time"
1. status: "Operational"

```javascript
const makeSign = require('moti-make-sign');
const sign = makeSign.create.bare();
```

Something like the following will be produced
```javascript
{
  segmentId: 7,
  postedSpeed: 60,
  postedDate: "2016-07-22T19:46:05.2127158Z",
  status: "Operational"
}
```

You can also pass in values for `segmentId` and `postedSpeed`.
```javascript
const options = {
  segmentId: 30,
  postedSpeed: 100
}
const sign = makeSign.create.bare(options);
```

## Creating data for full regular update (heartbeat)

There are many more attributes associated with the full sign object.
1. segmentId: random # between `1-100`
1. postedSpeed: random # between `50 60 70 80 90 100`
1. postedDate: "Current time"
1. status: "Operational"
1. direction: random `North South East West`
1. maxSpeed: 100
1. segmentName: "Sign ID"
1. vslsId:: "VSLS-ID"
1. lat: Random latitude coordinate
1. lon: Random longitude coordinate
1. history: 30 records of past speeds and timestamps

```javascript
const makeSign = require('moti-make-sign');
const sign = makeSign.create.full();
```

You can pass in additional parameters.
```javascript
const options = {
  segmentId: 30,
  postedSpeed: 100,
  direction: "North",
  historySize: 100
}

const sign = makeSign.create.full(options);
```

## Testing
```
npm test
```

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