# drayage-rate

> Calculates base, fsc, and all in rate.

Latest version **1.1.6** (published 2019-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install drayage-rate
pnpm add drayage-rate
yarn add drayage-rate
bun add drayage-rate
```

## 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 | 1.1.6 |
| Published | 2019-01-30 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jaime Torres |
| Maintainers | uddergrief |
| Keywords | npm, package, node, trucking, drayage, shipping container, drayageHelper, uddergrief |

## Links

- npm: https://www.npmjs.com/package/drayage-rate
- Repository: https://github.com/Uddergrief/drayage-rate
- Homepage: https://github.com/Uddergrief/drayage-rate#readme
- Issues: https://github.com/Uddergrief/drayage-rate/issues
- npm.io page: https://npm.io/package/drayage-rate

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2019-01-30
- 1.1.5 — 2019-01-30
- 1.1.4 — 2019-01-18
- 1.1.3 — 2019-01-18
- 1.1.2 — 2019-01-16
- 1.1.1 — 2019-01-16
- 1.0.2 — 2019-01-16
- 1.0.1 — 2019-01-16
- 1.0.0 — 2019-01-16

## README

# drayage-rate
Simple rate calculator for trucking companies.

## Installation
```
npm i drayage-rate
```

## Usage

```
const drayage = require('drayage-rate')

//drayage.rate(distance = 0, costPerMile = 2.5, fsc = .25, minRate = 200)

const input1 = [20, 2.5, 0.25]
const input2 = {
  distance: 55,
  costPerMile: 3.00,
  fsc: 0.20,
  minRate: 250
}

const example1 = drayage.rate(...input1);
console.log(example1) /*
{ inputs: { distance: 20, costPerMile: 2.5, fsc: 0.25, minRate: 200 },
  base: 250,
  fsc: 62.5,
  allIn: 312.5 }
  */

const example2 = drayage.rate(input2.distance, input2.costPerMile, input2.fsc, input2.minRate);
console.log(example2) /*
{ inputs: { distance: 55, costPerMile: 3, fsc: 0.2, minRate: 250 },
  base: 415,
  fsc: 83,
  allIn: 498 }
  */

  const example3 = drayage.rate();
  console.log(example3);
  /* { inputs: { distance: 0, costPerMile: 2.5, fsc: 0.25, minRate: 200 },
    base: 200,
    fsc: 50,
    allIn: 250 } */

```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)

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