Massively Fun JS Commons
MF is the Massively Fun "commons" library, for use across projects. Some things it gives you:
MfTaskManager - an abstraction around setTimeout/process.nextTick. You may execute tasks:
- Soon, once
- Very soon, once
MfNotificationCenter - simple sub/pub, loosely modeled after Cocoa's NotificationCenter
mf.core.channel()) - provides a single-pub, multi-sub channel.
Various utility functions useful for all MF projects, such as:
- A component loader, for exposing internal modules as components of the greater NPM module.
- A Configuration object, which can be backed by an arbitrary configuration provider.
- Several latches for asynchronous conditionals.
Various collection classes:
Hashtable, which provides reasonably quick lookup. Allows you to use objects as keys, provided they implement
OrderedHash, modelled after after Ruby's Hash implementation, OrderedHash is basically a doubly linked list with hash table look up. This allows ordered iteration and constant time look up of elements by UUID.
- A priority queue.