# cratez

> handy class for managing enterprise resources. sets up a db, system events, and allows user to make proxy and regular requests

Latest version **0.1.0** (published 2017-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install cratez
pnpm add cratez
yarn add cratez
bun add cratez
```

## 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 | 2017-07-04 |
| First published | 2017-02-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | Joshua N. Jordan |
| Maintainers | joshuanjordan |
| Keywords | node, ES2016 |

## Links

- npm: https://www.npmjs.com/package/cratez
- npm.io page: https://npm.io/package/cratez

## Dependencies (2)

- [mongodb](https://npm.io/package/mongodb.md) ^2.2.22
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^1.0.0

## 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

- 0.1.0 (latest) — 2017-07-04
- 0.0.2 — 2017-02-18
- 0.0.1 — 2017-02-18

## README

# CRATEZ
## A box of functionality that communicates with itself, other boxes, and the system's assembly line.

If your project is event driven with streams or whatever, then you have lot's of little messages firing away and functions executing in response. Cratez connects whater data you can imagine as an object of key/value pairs to a broader system's Event Emitter, a database, and it's own local Event Emitter. Just a box of helpful utilities for applications with data on the wire.

# Basic Usage
A Crate provides 2 methods:
- assemble
- inherit

## Assemble
```javascript
let crate = require('cratez.js').assemble() || require('cratez.js').assemble(initOptionsYouPassIn);
```

## Inherit
```javascript
let Crate = require('cratez.js').inherit;

class SomeCustomCrate extends Crate {
  constructor(initOpts) {
    super(...initOpts);
      ...stuff goes here
    }
}
```

** pay careful attention to how events are registered, it's a type/fn mapping that points to a method on the extended class **
...so MyExtendedWonder.someMethod can map to system events via:
```javascript
super.registerEvents({someSystemEvent: {type: 'system', fn: this.someMethod}});
```

## MOVING FORWARD
- the only DB this works with currently is Mongo; I do plan to implement a new DB connection with each release moving forward
- calling assemble without any initialization options is pretty worthless at this point, it will become more useful as this project develops
- I built this module for me, so I don't really care if it doesn't help you; however, I do expect it to grow and become more useful to others down the road.
- go through the [code](https://github.com/joshuaNjordan85/cratez) for more usage...I'm not at a level of concern high enough to document heavily

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