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

sparkles

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sparkles - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

CHANGELOG.md

7

index.js

@@ -5,4 +5,4 @@ 'use strict';

var sparklesNamespace = 'store@sparkles';
var defaultNamespace = 'default';
var sparklesNamespace = Symbol.for('sparkles:store');
var defaultNamespace = Symbol.for('sparkles:namespace');

@@ -20,3 +20,2 @@ function getStore() {

function getEmitter(namespace) {
var store = getStore();

@@ -43,3 +42,3 @@

return !!(store[namespace]);
return !!store[namespace];
}

@@ -46,0 +45,0 @@

{
"name": "sparkles",
"version": "1.0.1",
"version": "2.0.0",
"description": "Namespaced global event emitter",

@@ -12,3 +12,3 @@ "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",

"engines": {
"node": ">= 0.10"
"node": ">= 10.13.0"
},

@@ -23,15 +23,21 @@ "main": "index.js",

"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
"test": "nyc mocha --async-only"
},
"dependencies": {},
"devDependencies": {
"eslint": "^2.13.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"mocha": "^3.5.3"
"eslint": "^7.32.0",
"eslint-config-gulp": "^5.0.1",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.3.1",
"mocha": "^8.4.0",
"nyc": "^15.1.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [

@@ -38,0 +44,0 @@ "ee",

@@ -9,3 +9,3 @@ <p align="center">

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

@@ -20,6 +20,8 @@ Namespaced global event emitter

Note: If you put an event handler in a file in your application, that file must be loaded in via an import somewhere in your application, even if it's not directly being used. Otherwise, it will not be loaded into memory.
```js
var sparkles = require('sparkles')(); // make sure to call the function
sparkles.on('my-event', function(evt){
sparkles.on('my-event', function (evt) {
console.log('my-event handled', evt);

@@ -35,3 +37,3 @@ });

Returns an EventEmitter that is shared amongst the provided namespace. If no namespace
Returns an EventEmitter that is shared amongst the provided namespace. If no namespace
is provided, returns a default EventEmitter.

@@ -51,16 +53,12 @@

[downloads-image]: http://img.shields.io/npm/dm/sparkles.svg
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/sparkles.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/sparkles
[npm-image]: http://img.shields.io/npm/v/sparkles.svg
[npm-image]: https://img.shields.io/npm/v/sparkles.svg?style=flat-square
[travis-url]: https://travis-ci.org/gulpjs/sparkles
[travis-image]: http://img.shields.io/travis/gulpjs/sparkles.svg?label=travis-ci
[ci-url]: https://github.com/gulpjs/sparkles/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/sparkles/dev?style=flat-square
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/sparkles
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/sparkles.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/sparkles
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/sparkles/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/sparkles/master.svg?style=flat-square
<!-- prettier-ignore-end -->

Sorry, the diff of this file is not supported yet

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