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

pmore

v0.1.1

Published

A BBS Pmore system written in JavaScript.

Downloads

5

Readme

Pmore-js

A BBS Pmore system written in JavaScript.

Features

  • Parse pmore statements and run it.

Install

npm install --save pmore

Usage

var Pmore = require("pmore");

// A list of frames and the viewer service. See follow.
var pmore = Pmore(frames, myViewer);

// Transfer key event to pmore
window.addEventListener("keypress", function(event) {
	var key = event.key;
	// Map special key into "@x" form. See `inputOption.key` in `viewer.inputStart`
	if (key in specialMap) {
		key = specialMap[key];;
	}
	pmore.trigger(key);
});

// Start the animation
pmore.start();

Frame

var frame = {
	line: 0,	// The line number of the ^L tag.
	control: "^L..."	// ^L definition. This will be parsed into a control
						// object after sending to pmore
};

Viewer

Viewer is a service used by pmore. Implement it with following interface:

var viewer = {
	
	scrollTo: function(frame) {
		/* Scroll to the frame.
		
		The viewer should show the next line of ^L tag, i.e. the 
		`frame.line + 1` line.
		*/
	},
	
	scrollToLine: function(line) {
		/* Scroll to specified line. Return false when out of index */
	},
	
	getPageSize: function() {
		/* Return how many lines in one page. Integer. */
	}
	
	pause: function() {
		/* Display the pause message */
	},
	
	unpause: function() {
		/* Remove the pause message */
	},
	
	forceEnd: function() {
		/* This will be called when pmore is forced ended.

		That is, q key or any key that is not kept.
		*/
	}
	
	end: function() {
		/* This will be called when pmore stopped.

		It could be stopped by the user (after forceEnd) or met the ^LE tag.
		*/
	},
	
	inputStart: function(options) {
		/* Display a menu showing input options.
		
		`options` is a list of option object.
		
		The option object contains a `key` property and a `message` property.
		
		`option.key` is a printable character, or a 2 length string starting
		with "@". If it starts with "@", it represents a special key as follow:
		(case-sensitive)
		
		- @u UP
		- @d DOWN
		- @l LEFT
		- @r RIGHT
		- @b BACKSPACE
		- @H HOME
		- @E END
		- @P PAGEUP
		- @N PAGEDOWN
		- @I INSERT
		- @D DELETE
		- @a ANY KEY
		
		`option.key` is used to describe which key can trigger the function.
		
		`option.message` is the describtion of the option. String.
		*/
	},
	
	inputEnd: function() {
		/* Remove input menu */
	},
	
	inputSelect: function(i) {
		/* Select an option with index `i`.

		It is common to highlight the option.
		*/
	}
};

Pmore

Pmore is a scriptable more system created by [email protected]. The implementation follows these references:

  • https://www.ptt.cc/bbs/BBSmovie/M.1197169523.A.F75.html
  • https://www.ptt.cc/bbs/BBSmovie/M.1243129226.A.25D.html

Changelog

  • 0.1.1 (Apr 30, 2016)

    • Fix unpause bug.
  • 0.1.0 (Apr 27, 2016)

    • First release.