New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arc-lib

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-lib - npm Package Compare versions

Comparing version 1.9.0 to 2.0.0

14

index.js
module.exports = {
is:require('arc-is'),
array:require('arc-array'),
object:require('arc-object'),
check:require('arc-check'),
events:require('arc-events'),
date:require('arc-date'),
regexp:require('arc-reg-exp'),
router:require('arc-router')
ArcArray:require('arc-array'),
ArcObject:require('arc-object'),
ArcCheck:require('arc-check'),
ArcEvents:require('arc-events'),
ArcDate:require('arc-date'),
ArcRegExp:require('arc-reg-exp'),
ArcRouter:require('arc-router')
};
{
"name": "arc-lib",
"version": "1.9.0",
"version": "2.0.0",
"description": "ARC",

@@ -20,11 +20,11 @@ "main": "index.js",

"dependencies": {
"arc-array": "3.2.2",
"arc-check": "1.0.3",
"arc-array": "4.0.1",
"arc-check": "1.1.0",
"arc-date": "1.0.0",
"arc-events": "1.1.2",
"arc-events": "2.0.0",
"arc-is": "1.0.5",
"arc-object": "1.5.0",
"arc-object": "2.0.0",
"arc-reg-exp": "1.0.0",
"arc-router": "1.0.0"
"arc-router": "1.1.0"
}
}

@@ -1,1 +0,65 @@

# arc-lib
# arc-lib
A convenience wrapper around the ARC Library classes
## Install
```
$ npm install arc-reg-exp --save
```
## Wraps
* arc-is
* arc-array
* arc-check
* arc-date
* arc-events
* arc-object
* arc-reg-exp
* arc-router
## Exports
```js
{
is,
ArcArray,
ArcCheck,
ArcDate,
ArcEvents,
ArcObject,
ArcRegExp,
ArcRouter
}
```
## Example Usage
```js
const {is,ArcRouter,ArcEvents} = require('arc-lib');
//Pretend we're useful useful
const SomeViewController = {};
//Use ArcEvents to mixin events on the object
ArcEvents.mixin(SomeViewController);
//Bind an event
SomeViewController.on('validPath',(_path,_id)=>{
console.log(_path,_id);
});
//Setup a functional router
const SomeRouter = new ArcRouter({
'/some/**path[/]/#id':'validPath'
});
//Travel a path
const routeData = SomeRouter.travel('/some/resource/path/75');
//We should match
if(routeData.match){
//Path in the resolved path and id from the path
SomeViewController.emit(routeData.match,[routeData.path,routeData.id]);
}
//Will console.log('resource/path',75) by trigger the validPath event
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc