koriggans:k
Meteor package to define a namespace "K" for
Korrigans packages and applications.
It also defines an Internals
namespace to reference various internals
methods and fields for Korrigans packages, and an ErrorLog
namespace
to use as a registry.
In your Meteor app directory, enter:
$ meteor add koriggans:k
This package defines an error registry K.ErrorLog
which can be used to
log and store errors.
To use, define a registry with K.ErrorLog.add
:
K.ErrorLog.add('my registry');
You can store any JavaScript value inside this log. To log an entry:
const logIndex = K.ErrorLog.log('my registry', { foo : 'value' });
Each registry is an array. To retrieve an entry:
K.ErrorLog['my registry'][logIndex];
To empty the registry:
K.ErrorLog.clear('my registry');
Each registry has a maximum size (to avoid logging thousands of errors on
production servers). The default size of each registry is 10 entries.
If one tries to log an entry in a full registry, oldest value is discarded.
You can specify a max size to be used for a specific registry at creation:
K.ErrorLog.add('my registry', 42);
- meteor-k-debug alias koriggans:k-debug
- meteor-k-check alias koriggans:k-check
- meteor-k-pattern alias koriggans:k-pattern
- meteor-k-schema alias koriggans:k-schema
In your Meteor app directory, clone the package files in packages
folder:
$ git clone https://github.com/Korrigans/meteor-k
In your Meteor app directory, enter:
$ set VELOCITY_TEST_PACKAGES=1
$ meteor test-packages --driver-package velocity:html-reporter korrigans:k
- MrLowkos: @github - @atmosphere
- Aralun: @github - @atmosphere