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

kyper-matter

v0.2.10

Published

Library to provide simple application functionality like authentication and local/session/token storage for Tesselate applications.

Downloads

55

Readme

Matter

npm version npm downloads build status dependencies status codeclimate coverage license

What are the minimal tools I need to make an app matter?

Matter is a Javascript library that provides common web application functionality such as user authentication and local/session/token storage. This library is built to communicate with a Tessellate Server such as Tessellate for application data, but custom server setups are on the roadmap.

Matter is Isomorphic, which means it will work well in both Browser and NodeJS environments. ES6 functionality is also available through importing and/or extending Matter (more details below).

Quick Start

Using Matter requires having created an application on Build, Tessellate or on your own Tessellate server.

Browser

  1. Include the Matter library using one of the following:

CDN

To use the CDN, add the following script tag to your index.html:

```html
<!-- Matter Library Bundle -->
<script src="http://cdn.kyper.io/js/matter/latest/matter.js"></script>
```

Bower

Run bower install --save kyper-matter

  1. Start using Matter by providing the name of the app you created on Build or Tessellate:
//New Matter object with the application name 'exampleApp'
var matter = new Matter('exampleApp');
  1. Start using Matter:
//Login to account with username "test" and password "test"
matter.login({username:"test", password:"test"}).then(function(user){
    console.log('User logged into exampleApp:', user);
});

ES6

  1. Run npm install --save kyper-matter
  2. Import Matter library
import Matter from 'kyper-matter';
  1. Create a new matter application object:
//New matter object with the application name 'exampleApp'
let matter = new Matter('exampleApp');
//Login to account with username "test" and password "test"
matter.login({username:"test", password:"test"}).then((user) => {
  console.log('User logged into exampleApp:', user);
}, (err) => {
  console.error('Error logging in:', err);
});
  1. Use Matter methods

NodeJS

  1. Run npm install --save kyper-matter
  2. Import Matter library
var Matter = require('kyper-matter');
  1. Create a new matter application object:
//New matter object with the application name 'exampleApp'
var matter = new Matter('exampleApp');
//Login to account with username "test" and password "test"
matter.login({username:"test", password:"test"}).then(function(user) {
  console.log('User logged into exampleApp:', user);
}, function(err) {
  console.error('Error logging in:', err);
});

Options

When creating a new matter object, you can provide an options object as the second argument:

//New matter object with the application name 'exampleApp'
var optionsObj = {
  localServer: false,
  logLevel: 'trace'
}
var matter = new Matter('exampleApp', optionsObj);

Availble options:

  • logLevel - Level of logging (error, warn, info, debug, or trace)
  • localServer - Boolean of whether or not to use local tessellate server

Docs

API Documentation

Examples

More Information

For more details please visit the Matter Wiki.

Test

Tests are located in test folder and can be run via gulp test or gulp coverage commands.

index.html has been added as a bare bones test page similar to browser example (`/examples/browser/index.html).

TODO

  • Run tests git pre-push
  • More local storage capabilities
  • Version release gulp task