Socket
Socket
Sign inDemoInstall

dashboards

Package Overview
Dependencies
5
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

1

index.js

@@ -59,2 +59,3 @@

Dashboards.prototype.run =
Dashboards.prototype.update = function (callback) {

@@ -61,0 +62,0 @@ var data = {};

4

package.json
{
"name": "dashboards",
"version": "0.0.1",
"version": "0.0.2",
"repository": "git://github.com/segmentio/dashboards.git",

@@ -12,4 +12,4 @@ "description": "Simple and pluggable dashboards",

"debug": "~0.7.4",
"parallel-ware": "0.0.1"
"parallel-ware": "~0.0.1"
}
}
# dashboards
Simple and pluggable dashboards.
Simple and _pluggable_ dashboards.
## Installation
```js
var Dashboards = require('dashboards');
$ npm install segmentio/dashboards
## Example
```js
var dashboards = new Dashboards()

@@ -21,2 +17,27 @@ .use(subscriptions('stripe-key'))

![](https://f.cloud.github.com/assets/658544/2361169/09325510-a62e-11e3-8f49-e327e89595cd.png)
**It's easy to get started:** there's already plugins for [Stripe][1], [Helpscout][2], [AWS][3], and others.
**It separates data and views:** make your own decisions about what to put on your dashboards.
**It's dashboard agnostic:** so you can use [Geckoboard][4], [Ducksboard][5], [Leftronic][6], or your own internal dashboards.
**It pushes you in the right direction:** use [Segment.io][7]'s [dashboards expertise][8] to avoid the wrong metrics.
[1]: https://github.com/dashboards-stripe-charges
[2]: https://github.com/segmentio/dashboards-helpscout
[3]: https://github.com/segmentio/dashboards-aws-billing
[4]: http://www.geckoboard.com/
[5]: https://ducksboard.com/
[6]: https://www.leftronic.com/
[7]: https://segment.io/
[8]: https://segment.io/academy/dashboard-metrics-that-actually-work/
## Installation
$ npm install dashboards
## How does it work?

@@ -67,3 +88,3 @@

but wait! waiting for data and piping it to a dashboard is even easier:
but wait! waiting for data and piping it to a dashboard gets even easier:

@@ -79,3 +100,2 @@ ```js

Existing plugins for dashboards can tell you:

@@ -88,18 +108,24 @@

![](https://f.cloud.github.com/assets/658544/2361183/33c4df78-a62e-11e3-9921-6591e787e43e.png)
## API
#### Dashboards()
#### new Dashboards()
Create a new Dashboards instance.
Create a new `Dashboards` instance.
#### .use(plugin)
#### #use(plugin)
Add a dashboard `plugin` which is an object that contains a `fn` plugin and a `ready` function, like so `{ ready: hasEmail, fn: domain }`
Add a dashboard `plugin` which is either a function or an object that contains a `fn` plugin and a `ready` function, like so:
#### .when(ready, fn)
```js
{ ready: hasCharges, fn: send }
```
Execute the dashboard plugin `fn` when the `ready` function returns true. This allows you to wait until you have a piece of data before sending it to a dashboard. Read more about ready functions in [parallel-ware](https://github.com/segmentio/parallel-ware).
#### #when(ready, fn)
#### .run(callback)
Execute the dashboard plugin `fn` when the `ready` function returns true. This allows you to wait until you have a piece of data before sending it to a dashboard. Read more about ready functions in [parallel-ware](https://github.com/segmentio/parallel-ware).
#### #run(callback)
Run the dashboard plugins.

@@ -110,2 +136,13 @@

MIT
```
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc