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

argumenta-widgets

v0.1.5

Published

JavaScript Widgets for Argumenta.

Readme

Argumenta Widgets

JavaScript widgets for Argumenta. Designed for Argumenta.io. Use anywhere on the web!
Includes arguments, propositions, and (support, dispute, citation) tags.

Example

To use Argumenta widgets on any page, just include the JavaScript source and a widget element.
Here's an example argument widget. It displays the latest argument published at the given repo:

<!DOCTYPE html>
<html>
  <head></head>
  <body>
    <!-- Widget Element -->
    <div class="argument-widget" data-repo="qualiabyte/my-argument-^_^"></div>
    <!-- Argumenta Widgets -->
    <script src="https://argumenta.io/widgets.js"></script>
  </body>
</html>

When the JavaScript loads, any placeholders on the page are automatically activated.
This initializes each widget, loading content from data- attributes and Argumenta's REST API.

API

Argument

Argument data can either be specified directly, or loaded via the REST API.
Just set one of the following options: argument, sha1, or repo.

<!-- Loads argument data directly, or from API by SHA-1 or repo. -->
<div class="argument-widget" data-argument='{"title":"My Argument ^_^","premises":["The first premise!","The second premise!"],"conclusion":"The conclusion.","object_type":"argument","sha1":"50250211801dabf9cbf0e574af270ba2c3fe83cb","repo":"my-argument-^_^","metadata":{"discussions_count":"1"},"commit":{"object_type":"commit","sha1":"ec9a968237e676e954f4a56d1b54727e457825b9","target_type":"argument","target_sha1":"50250211801dabf9cbf0e574af270ba2c3fe83cb","committer":"qualiabyte","commit_date":"2013-05-28T12:34:01Z","parent_sha1s":[],"host":null}}'></div>
<div class="argument-widget" data-sha1="50250211801dabf9cbf0e574af270ba2c3fe83cb"></div>
<div class="argument-widget" data-repo="qualiabyte/my-argument-^_^"></div>

When using the REST API, no other options are required – but the display options may still be useful!
These include show_propositions and show_discussions.

<!-- Changes the default display options. -->
<div class="argument-widget" data-show_propositions="false" data-sha1="50250211801dabf9cbf0e574af270ba2c3fe83cb"></div>
<div class="argument-widget" data-show_discussions="true" data-sha1="50250211801dabf9cbf0e574af270ba2c3fe83cb"></div>

Here's the full list of argument options:

  • argument Object The argument data.
  • argument.title String The title.
  • argument.premises Array<String> The premises.
  • argument.conclusion String The conclusion.
  • argument.object_type String The object type. ("argument")
  • argument.metadata Object The argument's metadata.
  • argument.metadata.discussions_count Number The discussions count. (Default: 0)
  • commit Object The argument's commit data.
  • propositions Array<Object> An array of argument propositions data. (Optional; for caching)
  • repo String The argument's repo. (Example: "user/repo")
  • sha1 String The argument's SHA-1.
  • show_discussions Boolean Whether to show discussions initially. (Default: false)
  • show_propositions Boolean Whether to show propositions initially. (Default: true)

Install

Argumenta widgets can also be installed as a node module, for convenient use in other projects.

$ npm install argumenta-widgets

To use this local module, create a link to the desired assets:

$ ln -s ./node_modules/argumenta-widgets/development ./widgets  # For development.
$ ln -s ./node_modules/argumenta-widgets/production ./widgets   # For production.

License

MIT