Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arc-events

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-events - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

4

index.js

@@ -161,2 +161,6 @@ "use strict";

checkState(_state){
return (this.states[_state] === true ? true : false);
}
clearState(_event){

@@ -163,0 +167,0 @@ delete this.states[_event];

2

package.json
{
"name": "arc-events",
"version": "1.0.0",
"version": "1.1.0",
"description": "Independent Events class",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -138,2 +138,5 @@ # arc-events [![Build Status](https://travis-ci.org/anyuzer/arc-events.svg?branch=master)](https://travis-ci.org/anyuzer/arc-events)

### .checkState(`state:String`)
Check to see whether a state has fired. Returns `true` or `false`
### .once(`event:String, listener:Function [,customId:Mixed]`)

@@ -140,0 +143,0 @@ Set a callback to listen for an event being emitted. When the listener fires, it will automatically be removed internally as a listener and will no longer fire on subsequent events.

@@ -54,2 +54,14 @@ "use strict";

tap.test('ArcEvents.checkState',function(_test){
EventTest.clear();
//Has not fired
_test.equal(EventTest.checkState('loaded'),false);
EventTest.emitState('loaded');
//Has fired
_test.equal(EventTest.checkState('loaded'),true);
_test.end();
});
tap.test('ArcEvents.setCatchAll',function(_test){

@@ -56,0 +68,0 @@ EventTest.clear();

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