Socket
Socket
Sign inDemoInstall

@drauu/core

Package Overview
Dependencies
0
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

5

dist/index.d.ts

@@ -49,2 +49,4 @@ interface Unsubscribe {

update: () => void;
mounted: () => void;
unmounted: () => void;
}

@@ -100,4 +102,5 @@

get model(): BaseModel<SVGElement>;
get mounted(): boolean;
mount(selector: string | SVGSVGElement): void;
unmounted(): void;
unmount(): void;
on<K extends keyof EventsMap>(type: K, fn: EventsMap[K]): Unsubscribe;

@@ -104,0 +107,0 @@ undo(): boolean;

10

dist/index.global.js

@@ -358,3 +358,8 @@ (() => {

}
get mounted() {
return !!this.el;
}
mount(selector) {
if (this.el)
throw new Error("[drauu] already mounted, unmount previous target first");
if (typeof selector === "string")

@@ -391,6 +396,9 @@ this.el = document.querySelector(selector);

});
this._emitter.emit("mounted");
}
unmounted() {
unmount() {
this._disposables.forEach((fn) => fn());
this._disposables.length = 0;
this.el = null;
this._emitter.emit("unmounted");
}

@@ -397,0 +405,0 @@ on(type, fn) {

@@ -371,3 +371,8 @@ var __defProp = Object.defineProperty;

}
get mounted() {
return !!this.el;
}
mount(selector) {
if (this.el)
throw new Error("[drauu] already mounted, unmount previous target first");
if (typeof selector === "string")

@@ -404,6 +409,9 @@ this.el = document.querySelector(selector);

});
this._emitter.emit("mounted");
}
unmounted() {
unmount() {
this._disposables.forEach((fn) => fn());
this._disposables.length = 0;
this.el = null;
this._emitter.emit("unmounted");
}

@@ -410,0 +418,0 @@ on(type, fn) {

{
"name": "@drauu/core",
"version": "0.0.4",
"version": "0.0.5",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.mjs",

Sorry, the diff of this file is not supported yet

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