Freebies

The following packages are free software, that OneHat offers to the world under the MIT license. May they be as useful to you as they have been to us!

Chrome Plugin: Ticket Number Generator

Use our free Chrome plugin, the Ticket Number Generator, for your favorite project management software, like Freedcamp or Asana! This plugin will insert a ticket number—always one higher than the previous—into any text field on a page.

Use it for individuals or teams. It’s fully customizable to fit your workflow.

NPM Module: OneHat Data

@onehat/data This package is a robust ORM for Javascript.

  • Repositories. A repository stores many entities in a storage medium. Equivalent to a database table. Repositories can sort, search/filter, and add/edit/delete their constituent entities.
  • Storage Mediums. Repositories are specialized to store their data in a storage medium. Available types include: Memory, Ajax, Rest, LocalStorage (Browser), SessionStorage (Browser), IndexedDB (Browser), AsyncStorage (React Native/Expo), SecureStore (React Native/Expo). One special repository type of repository—LocalFromRemote—combines two different repositories, one local and one remote, which allows for autosyncing between the local and remote repositories, enabling true offline-first capability.
  • Entities. An entity is a single record of data, organized into properties. Equivalent to a database row. Entity data can be accessed directly (entity.username), via specific properties (entity.properties.username.displayValue), or by obtaining a JS object of the whole entity (entity.getDisplayValues(), or entity.getSubmitValues()).
  • Properties. A property is a single unit of data. Equivalent to a database field. Properties are differentiated into different property types (e.g. Integer, String, Boolean, etc), and allow for easy formatting of “display” or “submit” values. For example, a date might be set to display as “Wed, Feb 5, 2020” but submit as “2020-02-05”.
  • Properties. A property is a single unit of data. Equivalent to a database field. Properties are differentiated into different property types (e.g. Integer, String, Boolean, etc), and allow for easy formatting of “display” or “submit” values. For example, a date might be set to display as “Wed, Feb 5, 2020” but submit as “2020-02-05”.

NPM Module: OneHat Events

@onehat/events This Javascript package takes the node.js events package and adds the following functionality:

  • Registration / unregistration of events. Events cannot be emitted until registered. This gives more control over the events, and forces better design. List of events can be obtained via emitter.getRegisteredEvents()
  • Pausing / resuming event emission. Paused events will be added to a queue, and can be optionally emitted when events are resumed. Default is to discard queued events when resuming.
  • Relaying of events from one object to another. A relayed event will appear to be emitted from the relaying object, not from the origin object.
  • Event Bubbling. Events can bubble up a hierarchy of classes or components.