New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

we-lib

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

we-lib

wickedElements through customElements registry

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

we-lib

A customElements indirection to have wicked-elements library a part, without needing to bundle it within components.

// vanilla
customElements.whenDefined('we-lib').then(() => {
  const {define} = customElements.get('we-lib');
  define('.my-component', {
    init() {
      console.log('my-component is ready');
    }
  });
});

// with helper
import when from 'once-defined';
when('we-lib').then(({define}) => {
  define('.another-component', {
    init() {
      console.log('another-component is ready');
    }
  });
});

Previous Work

  • uce provides this idea already
  • the idea has been described in this blog post

Keywords

wicked

FAQs

Package last updated on 30 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts