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

bff-lib

v0.6.4

Published

Basic Front-end Foundation - modules for JS front-end development

Downloads

10

Readme

, Basic Front-end Foundation Build Status

BFF is a collection of standalone modules, designed with the intent of making it easier to design interactive web applications. It comprises base classes for the MVC pattern (Record, View) but more importantly, generic building blocks for event systems (Event Emitter, Event Listener), inheritance (Extend), collections (List) and DOM manipulation (Patch DOM).

Its ambition is to be a helper library rather than a framework, to be mixed and matched with home grown or third-party components. As such, each BFF module provides a specific service, with a minimal interface. All modules are UMD compatible, which means that they support AMD and CommonJS loaders, as well as no loader at all.

Distinguishing features

  • Modular and without external dependencies.
  • Two versions; development and production. The former with lots of runtime error checking, the latter minified and without error checks, for optimal performance.
  • Fast and fool-proof event system - uses inversion-of-control to automatically keep track of registered event listeners.
  • Data modules (Record and List) combine event system with getters and setters, to create an event emitting, type safe, data layer that can be manipulated with the same syntax as plain JS objects.
  • Data modules support calculated properties, similar to signals in FRP, whose values are derived from one or more other properties - and still emits events when their calculated values change.
  • View module inspired by Backbone.js views, with the addition of React-like DOM patching and hierarchical structuring.

Compatibility

  • Latest versions (and presumably earlier) of Chrome, Firefox, Safari and Opera
  • Internet Explorer 9 and later
  • Node.js (except View and Patch DOM modules, which naturally require a browser environment)

Download

  • Run npm install bff-lib --save or bower install bff-lib --save in your project's root folder
  • Or, download a release directly from here.

Demos

Todo application (source)

Documentation

API reference

Want to contribute?

Building

npm install will install all project dev. dependencies.

grunt will lint the project, build dev and prod versions of BFF, compile JSDoc documentation, and run the Intern test suite

grunt watch will watch for source file changes and recompile the source and documentation

Running tests

Unit tests in browser

Go to [server root]/node_modules/intern/client.html?config=tests/intern in some browser

Unit tests in terminal (Node.js)

Run node_modules/.bin/intern-client config=tests/intern

Unit tests and functional tests in browser
  • Start a standalone Selenium server java -jar [path to selenium jar]
  • Run grunt test