npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

skizze

v0.0.3

Published

Node.js bindings to Skizze (https://github.com/skizzehq/skizze)

Downloads

3

Readme

node-skizze

node-skizze are Node.js bindings for the Skizze database.

NOTE node-skizze is alpha software and still in heavy development.

Installation

$ npm install --save skizze

Example

var skizze = require('skizze');

var client = skizze.createClient("127.0.0.1:3596", { insecure: true });

client.createDomain("mydomain", function(err) {

	client.addToDomain("mydomain", ['alvin', 'simon', 'theodore'], function(err) {
		client.getCardinality("mydomain", function(err, card) {
			console.log(err, card);
		});
	});
});

Documentation

Classes

Members

Functions

SkizzeClient

Kind: global class

new SkizzeClient()

Represents a connection to the Skizze database.

skizzeClient.createSnapshot(callback)

Request a snapshot to be taken.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | callback | function | A callback to call when a reply is received. |

skizzeClient.getSnapshot(callback)

Get details of the current or last snapshot.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | callback | function | A callback to call with the details of the snapshot. |

skizzeClient.listSketches(type, callback)

List Sketches of a specific type.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | type | number | The type of sketch to list. | | callback | function | A callback to call with the list of Sketches. |

skizzeClient.listDomains(callback)

List all domains.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | callback | function | A callback to call with the list of Domains. |

skizzeClient.listAll(callback)

List all Sketches.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | callback | function | A callback to call with the list of Sketches. |

skizzeClient.createDomain(name, callback)

Create a new domain with default settings for it's Sketches.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the new domain. | | callback | function | A callback to call with the newly created domain. |

skizzeClient.createDomainWithProperties(name, sketches, callback)

Create a new domain with customized settings.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the new domain. | | sketches | Object | Configuration for each sketch type. | | callback | function | A callback to call with the newly created domain. |

skizzeClient.deleteDomain(name, callback)

Delete a domain.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the domain to delete. | | callback | function | A callback to call when the operation is complete. |

skizzeClient.getDomain(name, callback)

Get details of an existing domain.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the domain to get. | | callback | function | A callback to call with the domain details. |

skizzeClient.createSketch(name, callback)

Create a new Sketch.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the Sketch to create. | | callback | function | A callback to call with the new Sketch. |

skizzeClient.deleteSketch(name, callback)

Delete a Sketch.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch to delete. | | callback | function | A callback to call when the operation is complete. |

skizzeClient.getSketch(name, callback)

Get details of an existing sketch.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch to get. | | callback | function | A callback to call with the sketch details. |

skizzeClient.addToDomain(name, values, callback)

Add values to a domain.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the domain. | | values | Array(string) | The values to add to the domain. | | callback | function | A callback to call when the operation is complete. |

skizzeClient.addToSketch(name, values, callback)

Add values to a sketch.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch. | | values | Array(string) | The values to add to the sketch. | | callback | function | A callback to call when the operation is complete. |

skizzeClient.getMembership(name, values, callback)

Query the sketch for membership (true/false) for the provided values.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch. | | values | Array(string) | The values to query the membership of. | | callback | function | A callback to call with the results. |

skizzeClient.getMultiMembership(names, values, callback)

Query the sketches for membership (true/false) for the provided values.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | names | Array(string) | The names of the sketches to check. | | values | Array(string) | The values to query the membership of. | | callback | function | A callback to call with the results. |

skizzeClient.getFrequency(name, values, callback)

Query the sketch for frequency of the provided values.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch. | | values | Array(string) | The values to query the frequency of. | | callback | function | A callback to call with the results. |

skizzeClient.getMultiFrequency(names, values, callback)

Query the sketches for frequency of the provided values.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | names | Array(string) | The names of the sketches to check. | | values | Array(string) | The values to query the frequency of. | | callback | function | A callback to call with the results. |

skizzeClient.getRankings(name, callback)

Query the sketch for top rankings.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch. | | callback | function | A callback to call with the results. |

skizzeClient.getMultiRankings(names, callback)

Query the sketches top rankings.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | names | Array(string) | The names of the sketches to check. | | callback | function | A callback to call with the results. |

skizzeClient.getCardinality(name, callback)

Query the sketch for cardinality.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | name | string | The name of the sketch. | | callback | function | A callback to call with the results. |

skizzeClient.getMultiCardinality(names, callback)

Query the sketches for cardinality.

Kind: instance method of SkizzeClient

| Param | Type | Description | | --- | --- | --- | | names | Array(string) | The names of the sketches to check. | | callback | function | A callback to call with the results. |

sketchType : enum

Enum for Sketch type values.

Kind: global enum
Read only: true
Properties

| Name | Type | Default | | --- | --- | --- | | MEMBERSHIP | number | MEMBERSHIP | | FREQUENCY | number | FREQUENCY | | RANKINGS | number | RANKINGS | | CARDINALITY | number | CARDINALITY |

snapshotState : enum

Enum for Snapshot state values.

Kind: global enum
Read only: true
Properties

| Name | Type | Default | | --- | --- | --- | | PENDING | number | PENDING | | IN_PROGRESS | number | IN_PROGRESS | | SUCCESSFUL | number | SUCCESSFUL | | FAILED | number | FAILED |

createClient(address, options) ⇒ SkizzeClient

Creates and returns a new client connection to Skizze

Kind: global function
Returns: SkizzeClient - - A SkizzeClient.

| Param | Type | Description | | --- | --- | --- | | address | string | The address of the Skizze server e.g. "127.0.0.1:3596" | | options | Object | Options for configuring the client connection. | | options.insecure | boolean | Whether to create an insecure connection with the server. |

TODO

  • [ ] Merge in testing
  • [ ] Hook up to Travis
  • [x] Example
  • [x] Versioning
  • [x] npm

License

node-skizze is available under the Apache License, Version 2.0.

Authors