Socket
Socket
Sign inDemoInstall

@prezly/events

Package Overview
Dependencies
0
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 2.0.0

.idea/codeStyles/codeStyleConfig.xml

12

package.json
{
"name": "@prezly/events",
"version": "1.0.2",
"version": "2.0.0",
"description": "Event emitter with DOM-like EventTarget API & strong TypeScript typings",
"license": "MIT",
"main": "build/index.js",
"types": "build/index.d.ts",
"main": "build/commonjs/index.js",
"module": "build/esm/index.mjs",
"types": "build/types/index.d.ts",
"repository": {

@@ -17,3 +18,5 @@ "type": "git",

"scripts": {
"build": "tsc --project .",
"build": "npm run build:esm && npm run build:commonjs",
"build:commonjs": "tsc --project ./tsconfig.commonjs.json",
"build:esm": "tsc --project ./tsconfig.esm.json && renamer --force --find '.js' --replace '.mjs' 'build/esm/**/*.{js,js.map}'",
"check": "npm run prettier",

@@ -30,2 +33,3 @@ "clean": "rimraf build/ node_modules/",

"prettier": "^2.2.1",
"renamer": "^4.0.0",
"rimraf": "^3.0.2",

@@ -32,0 +36,0 @@ "typescript": "^4.1.5"

@@ -21,3 +21,3 @@ # @prezly/events

```tsx
import Events from '@prezly/events';
import { Events } from '@prezly/events';

@@ -24,0 +24,0 @@ const ref = { current: 0 };

@@ -1,4 +0,4 @@

import { Listener, RemoveListener } from './types';
import type { Listener, RemoveListener } from './types';
class Events<EventMap extends Record<string, unknown>> {
export class Events<EventMap extends Record<string, unknown>> {
private listeners: Partial<Record<keyof EventMap, Listener<any>[]>> = {};

@@ -40,3 +40,1 @@

}
export default Events;

@@ -1,2 +0,3 @@

export { default } from './Events';
import { Events } from './Events';
export * from './types';
export { Events };
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"allowSyntheticDefaultImports": false,
"downlevelIteration": true,
"esModuleInterop": true,
"esModuleInterop": false,
"forceConsistentCasingInFileNames": true,
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"lib": ["dom", "dom.iterable", "esnext"],
"module": "commonjs",
"moduleResolution": "node",
"noEmit": true,
"noImplicitAny": true,

@@ -17,8 +18,4 @@ "noImplicitReturns": true,

"strict": true,
"target": "es5",
"outDir": "./build",
"rootDir": "./src"
},
"include": ["./src"]
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc