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

@scriba-editor/plugin-datetime

v0.1.1

Published

Insert the current date or time in the Scriba editor.

Readme

@scriba-editor/plugin-datetime

Menu Data/ora per l'editor Scriba: inserisce la data o l'ora correnti nel formato scelto. Come il plugin "Insert date/time" di TinyMCE, con le stesse quattro scelte di partenza.

Installazione

pnpm add @scriba-editor/plugin-datetime

Uso

import { dateTimeMenu } from '@scriba-editor/plugin-datetime'

menubar.menus = [
  {
    id: 'insert',
    label: 'menu.insert',
    items: [dateTimeMenu() /* oppure dateTimeMenu({ locale: 'it-IT' }) */],
  },
]

Il menu mostra una voce per formato, con la data o l'ora calcolate nel momento in cui il menu si apre.

Opzioni (DateTimeOptions)

| Opzione | Default | Descrizione | | --------- | --------------------------------------------------------- | ---------------------------------------- | | locale | lingua lang della pagina, altrimenti quella del browser | Lingua dei formati. | | formats | ora, data ISO, data estesa, data breve | Elenco di DateTimeFormat, nell'ordine. | | now | () => new Date() | L'orologio (utile nei test). |

Un DateTimeFormat è un oggetto di opzioni di Intl.DateTimeFormat (es. { dateStyle: 'long' }) oppure 'iso-date' (2026-10-19) oppure 'iso-time' (14:05:09). DEFAULT_FORMATS contiene { timeStyle: 'medium' }, 'iso-date', { dateStyle: 'long' }, { dateStyle: 'short' }.

Cosa esporta

  • dateTimeMenu(options?): il menu (id: 'datetime', icona clock, etichetta i18n datetime.label).
  • formatDateTime(date, format, locale?): una data come testo (ora locale).
  • insertText(text): comando che scrive il testo al cursore, sostituendo la selezione.
  • DEFAULT_FORMATS, DateTimeFormat, DateTimeOptions.

Note

  • Il testo è inserito come testo semplice (nessun elemento <time>), come il comportamento predefinito di TinyMCE; funziona in qualunque testo, anche nel codice.
  • Non agisce se il cursore non è in un blocco di testo.
  • Sicurezza: si scrive solo testo generato dal browser, nessun HTML. Vedi sicurezza e plugin.