New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apajs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apajs

2kb library wrapping the Web Components API with reactivity out of the box.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source
Cute water drop with eyes and smile

ApăJS

Apă (water, in Romanian) – For when you just need a little hydration.

Intro

ApăJS is a minimal library aiming at reducing boilerplate around web components, yet keeping them fairly "vanilla". With its ~3kb (minified, ~1kb gzipped), it provides out-of-the-box:

  • A way of creating web components with a functional approach
  • Automatically add event handlers to DOM elements
  • Automatically store references to the DOM to lower the boilerplate around query selectors
  • First-class support for server-side rendered HTML

Getting started

The easiest way of getting started is via esm. You can import the main functions from there:

import { define, html } from "https://esm.sh/apajs@1.0.2";

define({ tag: "hello-world" }, function () {
  return html`<h1>Hello world!</h1>`;
});

Alternatively, if you want to use npm, npm i apajs.

Documentation is still WIP. If you're super curious and want to test it out, please take a look a the examples directory. There you can find several examples to have a first feel of how the syntax looks like!

Keywords

FAQs

Package last updated on 12 Feb 2024

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

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