npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

embed-lite

v0.1.4

Published

Zero-dependency, static URL-to-HTML embed parser for markdown and browser.

Readme

Embed Lite is an ultra-fast, zero-dependency Typescript and JavaScript library for statically mapping raw URLs directly into secure, ready-to-render HTML iframes or blockquotes entirely on the fly.

By totally dodging bulky asynchronous oEmbed network API calls, embed-lite achieves zero-latency renders across both the Browser and standard Node.js rendering pipelines simply by parsing regex matches.

Getting Started

1. Usage via CDN (Browsers)

For simple web applications or zero-build environments, you can pull the massively optimized, minified bundle straight from unpkg.

Setup Instructions:

<!-- Inject the module payload -->
<script src="https://unpkg.com/embed-lite@latest/dist/embed-lite.global.min.js"></script>

Implementation: Once loaded, the library natively exposes the embedLite object directly on your global window:

<div id="video-container"></div>

<script>
  // Parse natively on the client
  const parsed = window.embedLite.embed("https://youtube.com/watch?v=123");
  
  // Inject the raw iframe string directly!
  if (parsed) {
     document.getElementById('video-container').innerHTML = parsed.html;
  }
</script>

2. Usage via NPM (Node.js / React / Vue)

If you are developing a modern framework or server-side parser (React, Express, Nuxt, etc), install the Typescript-compatible module dynamically.

Setup Instructions:

npm install embed-lite

Implementation:

import { embed } from 'embed-lite';

const targetUrl = "https://x.com/x/status/123";

// Map the URL into HTML, alongside custom CSS targeting classes
const result = embed(targetUrl, { className: 'my-social-embed' });

if (result) {
    console.log(result.html);
    // Returns explicitly isolated payload:
    // <blockquote class="twitter-tweet my-social-embed">...</blockquote>
}

Supported Platforms

We currently actively process and intelligently map the following URLs into explicitly sanitized UI formats:

| Video Ecosystem | Audio Sources | Social Media | Design, Code & Mapping | |---|---|---|---| | ✅ YouTube | ✅ Spotify | ✅ Instagram | ✅ Codepen | | ✅ Vimeo | ✅ SoundCloud | ✅ Facebook | ✅ Figma | | ✅ Dailymotion | | ✅ X / Twitter | ✅ Google Maps | | ✅ TikTok | | ✅ Reddit | ✅ GitHub Gists | | | | ✅ LinkedIn | |

API Reference

embed(url: string, options?: EmbedOptions): { html: string } | null

This is the core mapping payload function. It rigidly parses the incoming url parameter and maps it against every platform plugin linearly.

Arguments:

  • url (required): The raw string representation of the target URL.
  • options.className (optional): Injects a CSS class safely into the root HTML tag (e.g., the root <iframe> or <blockquote>), allowing you to completely define sizing and bounding boxes downstream.

Returns:

  • Object containing the rendered { html: string } if a plugin caught and verified the pattern.
  • null if the URL schema is explicitly unsupported or malformed.

Extensibility & Architecture

embed-lite inherently relies on a decoupled Service Plugin architecture. To support new platforms natively, you just simply declare an object honoring the EmbedProvider Typescript Interface:

export const customService: EmbedProvider = {
  name: 'Service Name',
  match: (url) => url.hostname.includes('example.com'),
  generate: (url, options) => {
    return `<iframe class="${options.className || ''}" src="..."></iframe>`;
  }
}

(We actively process Pull Requests for major new platforms! Please consider contributing if you add custom layers!)

Community & Support

  • Maintainer: @mgks
  • Support the Project: If embed-lite saved you from integrating bulky SDK tools, please consider dropping a ⭐ and consider sponsoring the project.

License

Distributed under the MIT License. See LICENSE for more information.

Website Badge Sponsor Badge