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

bakanda

v0.0.3

Published

A node.js GraphQL back-end famework.

Downloads

9

Readme

Bakanda

A node.js GraphQL back-end famework.

UNDER CONSTRUCTION

This documentation is under construction.

The codebase is not in version 1 (yet).

Be patient!

Registry

Available properties in second argument object

Generic for all functions:

  • state - The current state object.
  • log - A scoped log function.
  • reg - A scoped function registry object.
  • passhasher - Function for hashing passwords.
  • passhasherSync - Synchronous function for hashing password.
  • validatePasshash - Function for validating a hashed password.
  • createToken - Function for creating a JWT token.
  • parseToken - Function for parsing a JWT token.
  • randStr - Function which returns a random string.
  • generateId - Function which returns a unique ID.
  • timestampFromId - Function which returns the creation time of an ID.
  • validIdForm - Function for validating the format of an ID string.
  • jwtPublicKey - The public key used for JWT tokens. (String.)

for command only:

  • addEvent - The function for adding another event to the event log.

For commands and queries only:

  • req - The expressjs req request object.
  • res - The expressjs res response object.
  • requestId - The unique ID for the current HTTP(S) request.
  • session - The session object (if there is a session).

NOTE: Command/query functions can be called directly from within a validator or a projection. In those cases, the command/query will (of course) NOT have a req, res, requestId or session, since it is not in the scope of a specific HTTP(S) request.

For event validators and event projectors only:

  • meta - Metadata object for the event.

Session handling

Todo

  • Always pass along the logged in user in all events, so the user can be used in validators and projectors. (In event meta?)
  • More automated way to identify function roles (validators, commands, projectors, queries) through the function names. Connect event types to validators and projectors by function names.
  • More automated way to tie formatters to graphql data types.
  • Generic user features built in to bakanda.
  • Error classes in registry? Or automated creation of error classes by proxies?
  • Streaming CSV data storage to disk, with helpers for filtering, etc.
  • Generic queryfunctions, just mapping some part of the state to a type (and then to a formatter connected to the type). Checking parameter names would make it possible to map id parameters to id values of items in an array in state.