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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nv-cli-webidl

v1.0.11

Published

nv-cli-webidl =============== - nv-cli-webidl - offline cli tool, to show webidl defined interface - it maybe useful when migrating to js-implement from other language

Downloads

5

Readme

nv-cli-webidl

  • nv-cli-webidl
  • offline cli tool, to show webidl defined interface
  • it maybe useful when migrating to js-implement from other language

install

  • npm install nv-cli-webidl -g

usage

examples

parse

@# nv_webidl -p

interface AccessibleNode {
    readonly attribute sequence<DOMString> states;
};


//press ctrl+D

special:  undefined
[
    {
        "type": "interface",
        "name": "AccessibleNode",
        "inheritance": null,
        "members": [
            {
                "type": "attribute",
                "name": "states",
                "idlType": {
                    "type": "attribute-type",
                    "extAttrs": [],
                    "generic": "sequence",
                    "nullable": false,
                    "union": false,
                    "idlType": [
                        {
                            "type": "attribute-type",
                            "extAttrs": [],
                            "generic": "",
                            "nullable": false,
                            "union": false,
                            "idlType": "DOMString"
                        }
                    ]
                },
                "extAttrs": [],
                "special": "",
                "readonly": true
            }
        ],
        "extAttrs": [],
        "partial": false
    }
]

intf srch

@# nv_webidl -i | egrep "^Event"
Event
EventHandler
EventListener
EventSource
EventTarget

json format

@# nv_webidl -j "^source.*list"


#SourceBufferList :

[
    {
        "type": "interface",
        "name": "SourceBufferList",
        "inheritance": "EventTarget",
        "members": [
            {
                "type": "attribute",
                "name": "length",
                "idlType": {
                    "type": "attribute-type",
                    "extAttrs": [],
                    "generic": "",
                    "nullable": false,
                    "union": false,
                    "idlType": "unsigned long"
                },
                "extAttrs": [],
                "special": "",
                "readonly": true
            },
            {
                "type": "attribute",
                "name": "onaddsourcebuffer",
                "idlType": {
                    "type": "attribute-type",
                    "extAttrs": [],
                    "generic": "",
                    "nullable": false,
                    "union": false,
                    "idlType": "EventHandler"
                },
                "extAttrs": [],
                "special": "",
                "readonly": false
            },
            {
                "type": "attribute",
                "name": "onremovesourcebuffer",
                "idlType": {
                    "type": "attribute-type",
                    "extAttrs": [],
                    "generic": "",
                    "nullable": false,
                    "union": false,
                    "idlType": "EventHandler"
                },
                "extAttrs": [],
                "special": "",
                "readonly": false
            },
            {
                "type": "operation",
                "name": "",
                "idlType": {
                    "type": "return-type",
                    "extAttrs": [],
                    "generic": "",
                    "nullable": false,
                    "union": false,
                    "idlType": "SourceBuffer"
                },
                "arguments": [
                    {
                        "type": "argument",
                        "name": "index",
                        "extAttrs": [],
                        "idlType": {
                            "type": "argument-type",
                            "extAttrs": [],
                            "generic": "",
                            "nullable": false,
                            "union": false,
                            "idlType": "unsigned long"
                        },
                        "default": null,
                        "optional": false,
                        "variadic": false
                    }
                ],
                "extAttrs": [],
                "special": "getter"
            }
        ],
        "extAttrs": [
            {
                "type": "extended-attribute",
                "name": "Pref",
                "rhs": {
                    "type": "string",
                    "value": "\"media.mediasource.enabled\""
                },
                "arguments": []
            }
        ],
        "partial": false
    }
]

webidl format

@# nv_webidl -w "^source.*list"


#SourceBufferList :

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */

/* This Source Code Form is subject to the terms of the Mozilla Public

 * License, v. 2.0. If a copy of the MPL was not distributed with this file,

 * You can obtain one at http://mozilla.org/MPL/2.0/.

 *

 * The origin of this IDL file is

 * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html

 *

 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C

 * liability, trademark and document use rules apply.

 */



[Pref="media.mediasource.enabled"]

interface SourceBufferList : EventTarget {

  readonly attribute unsigned long length;

  attribute EventHandler onaddsourcebuffer;

  attribute EventHandler onremovesourcebuffer;

  getter SourceBuffer (unsigned long index);

};

LICENSE

  • ISC