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

@daeinc/dom

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daeinc/dom - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

16

dist/index.js

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

"use strict";
/**

@@ -7,8 +6,6 @@ * append child to parent. if parent is undefined, append child to body

*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.toHTMLElement = exports.toElement = exports.appendChild = void 0;
const appendChild = (parent, child) => {
child = (0, exports.toElement)(child);
export const appendChild = (parent, child) => {
child = toElement(child);
if (parent !== undefined) {
parent = (0, exports.toElement)(parent);
parent = toElement(parent);
parent.appendChild(child);

@@ -20,3 +17,2 @@ }

};
exports.appendChild = appendChild;
/**

@@ -28,3 +24,3 @@ * convert selector (string) to Element. if already typeof Element, return as is.

*/
const toElement = (selector) => {
export const toElement = (selector) => {
if (typeof selector === "string") {

@@ -39,3 +35,2 @@ const element = document.querySelector(selector);

};
exports.toElement = toElement;
/**

@@ -47,3 +42,3 @@ * convert selector (string) to HTMLElement. if already typeof HTMLElement, return as is.

*/
const toHTMLElement = (selector) => {
export const toHTMLElement = (selector) => {
if (typeof selector === "string") {

@@ -58,3 +53,2 @@ const element = document.querySelector(selector);

};
exports.toHTMLElement = toHTMLElement;
//# sourceMappingURL=index.js.map
{
"name": "@daeinc/dom",
"version": "0.4.0",
"version": "0.4.1",
"description": "DOM utilities",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

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