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

@compone/define

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@compone/define - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

9

index.js

@@ -6,8 +6,9 @@ const classed = require('@compone/class')

, HTMLElement = client ? window.HTMLElement : class {}
, registry = client ? window.customElements : {}
module.exports = function define(name, component) {
if (arguments.length == 1) { component = name, name = `anon-${customElements.anon++}` }
if (arguments.length == 1) { component = name, name = `anon-${registry.anon++}` }
if (!name.includes('-')) return;
if (!client) return wrap(classed(component))
let wrapped = customElements.get(name)
let wrapped = registry.get(name)

@@ -25,3 +26,3 @@ if (wrapped) {

wrapped = wrap(classed(component))
customElements.define(name, wrapped)
registry.define(name, wrapped)
}

@@ -69,2 +70,2 @@

customElements.anon = customElements.anon || 1
registry.anon = registry.anon || 1
{
"name": "@compone/define",
"version": "1.1.2",
"version": "1.1.3",
"description": "",

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

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