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 🙏

© 2025 – Pkg Stats / Ryan Hefner

complay

v0.0.39

Published

Complay is a flexible JavaScript architecture library which let's us build our own framework/stack as needed.

Downloads

39

Readme

complay Build Status

complay is a flexible JavaScript architecture library which let's us build our own framework/stack as needed. Please be aware of the need to have a deep understanding of JavaScript, knowledge of ECMAScript specification and JavaScript Design Patterns in order to benefit from it's entire functionality. Consider complay to be a pro tool with a documented way for combining your own project framework, library or API. The outcome could easyly be used by JavaScript developers of all skill levels. To get us started right away, we have put together a standard package within js/complay.js (transpiled, bundled and gzipped < 10 KB) with some exquisite defaults.

Unique position features:

  • scales from basic static page ui enrichment
  • ... to the limits of our imagination
  • decide how much or less of framework functionalities your software ships

Unique build in technical features:

  • publish/subscribe
  • messaging
  • module lifecycle handling
  • memory management
  • mapping data resources or dom modules through class names

Unique features through extensions or compositions:

  • object relational mapper
  • inversion of control for requesting and retrieving data from resources
  • data state save and rollback mechanism at runtime
  • tiny dom abstraction library reduced to the bare minimum of our needs (jquery API but no drop in replacement)
  • game or animation loop control flow (in development)
  • scoped css (in development)
  • two way data binding
  • integration of templating engine of your choice
  • jQuery or similar dom library integration
  • reactjs integration (proof of concept)
  • webcomponents integration (proof of concept)
  • backbone/exoskeleton integration (proof of concept)

By-products:

  • an extensive and useful collection of helpers, used for complay and ready to be used in our project code
  • a set of polyfills, which let's you use features that are not implemented in all JavaScript engines yet

Getting started

When using a js packager like browerify or webpack with babel, we will install complay using

npm install complay --save

Example: Form Example

It is possible but not recommended for production to use a pre-built es5 version. Use this if you want to try out complay.

npm install complay --save

and in your HTML document include:

<script src="node_modules/complay/dist/complay.es5.js"></script>

In the examples directory you will find an example on how to use this.

Further information

To be honest, some things like for example templating, you nearly implement on your own. But we provide a recommended documented way to dock this onto complay. It is possible that we use this in an ES5 environment via dist/complay.js. But functionalities are limited and some will not work. An ES6 setup which imports the files might work much better.

Version: 0.0 Our library is under active development and things might change. As soon as we think that our API is rock solid, we will release a major version.

Todos

Documentation Version: tbd. Work in progress. Write "how to" documentation!:

  • How to use complay (documentation, tutorials, best practices)
  • How to extend or compose with complay (documentation, examples)
  • How to make architectural decisions, for building our stuff on top of complay?
  • How to contribute to complay base library?
  • How to contribute to complay helpers, extension and generics?

Definitions

Modules

We make use of Modules to implement everything, which is not related to responsabilities of services or components. But our Module class act as parent class for Services, Components and the ApplicationFacade For example:

  • Publish/Subscribe
  • Two way data binding
  • Mediators
  • Notifications
  • Router

Services

We use Services to implement models, collections and/or proxies. The data layer which is served by an array like object, makes it possible to output, save and modify the data the way it is needed. Includes:

  • Messaging
  • Promises
  • Functionality to modify our data
  • Commit and rollback mechanism

Components

We create components to implement views and/or view mediators.

  • Messaging
  • DOM API abstraction
  • Template engine

Extensions

This is your hook into complay API's and the possibility to extend the hell out of complay (Please don't take this serious!). Example use case: We want to build something using jQuery instead of default DOM API abstraction extension Types and examples of extensions

  • API
    • dom abstraction library - dom
    • templating - template
    • messaging - vent
  • Functional
    • e.g. Service.save, Service.fetch, Service.parse are not part of the basic library and we will need to pass these extensions to an instance or prototype of Service, if we want to provide AJAX, cookie parser and so on.
  • Mixins

We created some basic extensions, which are located in the js/extensions folder. The library works completely independent from these extensions and is customizable. Due to the lack of a developer documentation, we have to figure out how to implement that, using existing extensions as a starting point.

Helpers

Our helpers submodule located in js/helpers gives use the tools and polyfills we will need to implement the library and might be useful in a project created with complay or whatever we prefer.

Contribution setup

npm install

Run unit tests:

npm run tdd

License(s)

This lib make heavy use of great open source libraries and tools, including:

  • nodejs
  • babel
  • grunt
  • browserify
  • karma
  • mocha
  • chai
  • sinon
  • jquery
  • plite
  • and more See license files within node_modules folder for further informations regarding these and other libraries licenses.