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 🙏

© 2026 – Pkg Stats / Ryan Hefner

chatanyara.js

v0.2.1

Published

Collect Performance API data to a plain JavaScript Object

Downloads

4

Readme

chatanyara.js

Navigation and Resource Timing results

Name of this JavaScript helper utility has been inspired by the late Karate master from Okinawa, Japan. His name has also been dedicated to a few Karate and Ryukyu Kobujutsu kata, such as Chatanyara Kushanku and Chatanyara no sai.

wercker status browser support Analytics Development Dependency Status

Installation

chatanyara.js comes with a single file, called chatanyara.js and minified version of it as chatanyara.min.js.

It can be downloaded to a local copy directly from GitHub, or installed via Bower:

bower install Chatanyara.js

Or via npm:

npm install chatanyara.js

Also available via jsDelivr - Open Source CDN.

Usage

In order to retrieve the values for the given performance related features, it can be done as shown:

var results = Chatanyara.parse();

Please note that it should be done no sooner than document has been loaded, preferably after all assets have also been fully loaded.

The results will contain something similar as shown below, in case none of the features are supported:

{
  url: '/',
  userAgent: 'Mozilla 5 ...',
  navigation: false,
  resource: false,
  memory: false
}

Depending on the browser, the keys navigation, resource and memory will provide further information about each related performance API.

In a recent Google Chrome, the results could be something similar to:

{
  url: "/tests/index.html",
  userAgent: "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1870.2 Safari/537.36",
  navigation: {
    loadEventEnd: 552,
    loadEventStart: 552,
    domComplete: 552,
    domContentLoadedEventEnd: 548,
    domContentLoadedEventStart: 533,
    domInteractive: 533,
    domLoading: 346,
    responseEnd: 312,
    responseStart: 312,
    requestStart: 309,
    secureConnectionStart: 0,
    connectEnd: 308,
    connectStart: 81,
    domainLookupEnd: 81,
    domainLookupStart: 81,
    fetchStart: 81,
    redirectEnd: 0,
    redirectStart: 0,
    unloadEventEnd: 0,
    unloadEventStart: 0,
    navigationStart: 0,
    redirectCount: 0,
    navigationType: "NAVIGATE"
  },
  resource: [
    {
      responseEnd: 283.82799999963026,
      responseStart: 283.5369999993418,
      requestStart: 283.37099999771453,
      secureConnectionStart: 0,
      connectEnd: 283.08499999911874,
      connectStart: 283.08499999911874,
      domainLookupEnd: 283.08499999911874,
      domainLookupStart: 283.08499999911874,
      fetchStart: 283.08499999911874,
      redirectEnd: 0,
      redirectStart: 0,
      initiatorType: "link",
      duration: 0.7430000005115289,
      startTime: 283.08499999911874,
      entryType: "resource",
      name: "http://localhost:8000/node_modules/mocha/mocha.css"
    },
    {
      responseEnd: 286.09899999719346,
      responseStart: 283.84899999946356,
      requestStart: 283.7249999975029,
      secureConnectionStart: 0,
      connectEnd: 283.4519999996701,
      connectStart: 283.4519999996701,
      domainLookupEnd: 283.4519999996701,
      domainLookupStart: 283.4519999996701,
      fetchStart: 283.4519999996701,
      redirectEnd: 0,
      redirectStart: 0,
      initiatorType: "script",
      duration: 2.6469999975233804,
      startTime: 283.4519999996701,
      entryType: "resource",
      name: "http://localhost:8000/node_modules/mocha/mocha.js"
    }
  ],
  memory: {
    jsHeapSizeLimit: 793000000,
    usedJSHeapSize: 10000000,
    totalJSHeapSize: 10000000
  }
}

Testing

In order to run the included Mocha based unit tests, use the following command:

mocha-phantomjs tests/index.html

Additionally the code conventions and proper use of JavaScript can be validated via eslint:

node node_modules/eslint/bin/eslint.js --config .eslintrc --format compact Chatanyara.js

Minification

The minified version is compiled with the following command, with UglifyJS:

uglifyjs --compress --output Chatanyara.min.js --comments  Chatanyara.js

This command is saved in package.json as build script and can be executed with:

npm run build

JSCritic results

JSCritic is a tool that can be used to check how well a 3rd party script behaves in the terms of overwriting native objects and other practises that are considered harmful.

Below are the result for Chatanyara.js, version 0.1.2.

Does it browser sniff?              No
Does it extend native objects?      No
Does it use document.write?         No
Does it use eval?                   No
Does it use ES6 features?           No
Does it use Mozilla-only features?  No
Does it have IE incompatibilities?  No
How many global variables?          1
    Chatanyara
How many unused variables?          1
    Chatanyara
Total size                          3.07KB
Minified size                       1.08KB

Contributing

Please refer to a GitHub blog post on how to create somewhat perfect pull request.

Version history

Version | Date | Changes -------- | ---------- | -------- v0.2.1 | 2016-06-12 | v0.2.0 did not contain any JavaScript files... v0.2.0 | 2015-11-16 | Available via npm #9 #5. Testing at Wercker v0.1.3 | 2014-04-21 | ESLint full pass, available via jsDelivr #4 v0.1.2 | 2014-03-04 | Mocha tests running at Travis CI #1 v0.1.1 | 2014-01-01 | Vanilla JS release with removal of jQuery.each v0.1.0 | 2013-12-31 | First release

License

Copyright (c) Juga Paazmaya [email protected]

Licensed under the MIT license.