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

sirens

v0.17.0

Published

Interactive utilities to ease development, testing and debugging in Node.js, implemented in Node.js and GTK3.

Downloads

40

Readme

Sirens

Build Status

Sirens gives Node.js developers some simple and interactive utilities to ease development, testing, debugging and learning Node.

These utilities are written in Node and use GTK3 through node-gtk as its GUI support.

Note: this project is usable but it is still at an early stage of development.

Note: The current version opens with node v12 but it is not stable. See the pre-requisites section.

Update: checkout FingerTips design documentation in this article (updated in v0.15.0).

App browser

Next release:

Next Release Build Status

Installation

Note: please keep in mind that this project is not meant for production but only as an utility to be used during development.

Add Sirens to your project with

npm install sirens --save-dev

or install it globally with

npm install sirens -g

Usage

Require the sirens module and open a browser on any object with

require('sirens').browseObject(object)

or


const Sirens = require('sirens')

Sirens.browseObject(object)

Open a browser on any object properties and methods along its prototypes chain with

require('sirens').browsePrototypes(object)

or

const Sirens = require('sirens')

Sirens.browsePrototypes(object)

A Playground is a text editor where you can select, evaluate and inspect snippets of javascript code using the Sirens ObjectBrowser with the same access to the npm modules that your application has.

Think of it as a javascript console in 3 dimensions.

Open a Playground with

const Sirens = require('sirens')

Sirens.openPlayground()

An AppBrowser lets you browse the files in a selected folder.

In all cases it shows the contents of the file and for some type of files it also opens a specific browser.

For instance, with .js classes and methods it will open a browser on its documentation. With .json and .yml files it opens a browser on its structure.

Open an AppBrowser with

const Sirens = require('sirens')

Sirens.openAppBrowser()

Sirens command line

If you install Sirens globally

npm install sirens -g

you can open a javascript Playground from the command line with:

playground [javascript-filename.js]

and a javascript AppBrowser from the command line with:

appBrowser [folder]

If you install Sirens in the scope of a project with

npm install sirens --save-dev

you can open a javascript Playground from the project folder with

./node_modules/.bin/playground [javascript-filename.js]

and a javascript AppBrowser from the project folder with

./node_modules/.bin/appBrowser [folder]

Screenshots

Browsing an object

Object browser

Browsing prototypes

Prototype browser

Browsing text files

Text files

Browsing json files

Json browser

Browsing class methods

Class browser

Browsing class documentation

Class documentation browser

Browsing method documentation

Method documentation browser

Browsing tests

Tests browser

Pre-requisites

The current version works only with node <= v11.

nvm install v10

Please refer to the installation section of node-gtk.

Semantic versioning

Sirens release model follows the Semantic Versioning 2.0.0 convention.

However please note that:

  • Currently Sirens public API is the one declared in this document Usage section.

  • Sirens is still in version 0.y.z, meaning that all of its interfaces and protocols, including the public ones, are likely to keep changing quite often.

The O language and the Skins GUI builder used by Sirens browsers will be released as standalone libraries once they reach a stable public interface. This will happen once there are several new releases of Sirens with no modifications neither in the o-language nor in Skins public interfaces.

Development

Running the tests

Run the tests with

npm test

Running the examples

Run the browser and GTK widgets examples from the directory examples/.

For example

node examples/widgets/checkBox.js
node examples/browsers/objectBrowser.js

References

These utilities are based in the Smalltalk language browsers, in particular in the Object Arts implementation named Dolphin Smalltalk which I fancy for its outstanding beauty, and it's an independent port of Sirens for the Ruby language.

The graphics code is encapsulated in the Skins views layer and it should be possible to switch to any other graphics library, be it GTK+ or QT, implementing that layer alone.