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

janus-stdlib

v0.5.3

Published

The reference set of code components and build tools for Janus

Downloads

91

Readme

Janus Standard Library

The Janus Standard Library is a collection of useful Views and Varying helpers that reflect one opinionated way of building an application on top of Janus. Probably the most useful thing it does is provide generic, generally applicable default views for all the default Attribute class types, as well as List, in both default and edit contexts.

It depends on the presence of a DOM manipulation library largely compatible with the jQuery API: jQuery, Zepto, (and Cheerio? [TBD]) are all supported targets.

Build Status NPM version

Usage

To start, require the npm package: janus-stdlib.

You can register the entire library wholesale (recommended): require('janus-stdlib').view.registerWith(myLibrary).

Or, you can pick and choose what you wish to register; for instance: view.registerWith(myLibrary) for view in require('janus-stdlib').view when view not in [ 'literal', 'varying' ].

As noted above, there needs to be a jQuery-compatible library available. Currently, we default to using a combination of domino and jQuery for server-side rendering and unit testing (this may be replaced by Cheerio at some point in the future), and we require a local reference to janus-dollar to understand which DOM manipulation library you are using.

Development

Should be standard and straightforward: clone the repository, and make should set everything up assuming you have npm and node installed already. You can also make test to run the unit tests, or make test-coverage to run the unit tests and generate a code coverage report.

Contributing

Pull requests are welcome. If you wish to contribute, please bear in mind:

  • This is meant to be a relatively opinion-free standard library. Functionality that is too specific or pulls in particular dependencies are likely to be rejected.
  • Please do run the unit tests (make test) and create new ones where relevant.
  • Remember to write code in the philosophy of Janus. Avoid mutable state wherever possible, and leverage the Varying monad for as much business logic and state management as you can.

License

The Janus Standard Library is licensed under the WTFPL.