arc-lib
A convenience wrapper around the ARC Library classes
Install
$ npm install arc-lib --save
Wraps
Exports
{
is,
ArcArray,
ArcCheck,
ArcDate,
ArcEvents,
ArcObject,
ArcRegExp,
ArcRouter,
ArcHash
}
Example Usage
const {is,ArcRouter,ArcEvents} = require('arc-lib');
const SomeViewController = {};
ArcEvents.mixin(SomeViewController);
SomeViewController.on('validPath',(_path,_id)=>{
console.log(_path,_id);
});
const SomeRouter = new ArcRouter({
'/some/**path[/]/#id':'validPath'
});
const routeData = SomeRouter.travel('/some/resource/path/75');
if(routeData.match){
SomeViewController.emit(routeData.match,[routeData.path,routeData.id]);
}