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

comfortable-javascript

v1.3.1

Published

SDK for the Comfortable.io Delivery API for Javascript and Node.js

Downloads

523

Readme

Javascript Development Kit

Installation

NPM

Run this command:

npm install comfortable-javascript

For usage in the Browser

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/comfortable-javascript@latest/dist/comfortable.min.js"></script>

Note: For a specific version replace @latest with the version of your choice.

The SDK will be available as a global variable called: Comfortable

Downloadable version

Check out our release Page: https://github.com/cmftable/comfortable-javascript/releases

Include the dependency:

const Comfortable = require('comfortable-javascript');

Connect to your Repository and make your first request:

const api = Comfortable.api('{repository-api-id}', '{api-key}', options);

api.getDocuments()
  .then(result => {
    // futher implementation
  })
  .catch(err => {
    throw err;
  })

Complete documentation, installation instructions, and examples are available here.

Options:

| Option | Type | Description | |----------|---------|-------------------------------------------------------------------------------| | useProxy | boolean | enables the usage of a Proxy Endpoint instead of using https://api.cmft.io/v1 | | proxy | string | Proxy Url e.g. https://custom-api.com/v1 |

Tests

  1. npm is a prerequisite for running the tests. Install npm on your system, then run npm install to install required files.
  2. Edit tests/Api.ts to add your credentials and test documents. Alternatively you can set your credentials as environment variables. For this you have to define CMFT_REPOSITORY, CMFT_APIKEY, CMFT_DOCUMENT_ID, CMFT_DOCUMENT_ALIAS. CMFT_ASSET_ID. CMFT_PROXY_URL.
  3. The tests can be executed by running the following command from the root directory:
npm run test
// or
CMFT_REPOSITORY=... CMFT_APIKEY=... CMFT_DOCUMENT_ID=... CMFT_DOCUMENT_ALIAS=... CMFT_ASSET_ID=... CMFT_PROXY_URL=... npm run test

Docker-based test/build workflow

Use this if your host machine should not provide Node/npm directly.

  1. Build the SDK container image:
npm run docker:build-image
  1. Install dependencies in the container:
npm run docker:install
  1. Build SDK bundle in the container:
npm run docker:build
  1. Run tests in the container:
CMFT_REPOSITORY=... CMFT_APIKEY=... CMFT_DOCUMENT_ID=... CMFT_DOCUMENT_ALIAS=... CMFT_ASSET_ID=... CMFT_PROXY_URL=... npm run docker:test
  1. Optional: enable per-test response debug output:
CMFT_DEBUG_TESTS=1 npm run docker:test

This prints API responses for each test with the [TEST DEBUG] prefix.

Security audit in Docker

Read current security status:

npm run docker:audit

Read only production dependency status:

npm run docker:audit:prod

Apply non-breaking security fixes:

npm run docker:audit:fix

Apply all possible fixes including potentially breaking updates:

npm run docker:audit:fix:force

More information

Contributing

Pull requests are always welcome!

PRs Welcome

License

This repository is published under the MIT license.