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

@millionfor/io

v2.0.3

Published

generic io toolchain both for browser and node

Readme

@millionfor/io

Generic IO toolchain for both browser and Node.js environments.

Features

  • 🚀 Multi-environment support: Works in ES5, ES6, and TypeScript environments
  • 🌐 Cross-platform: Browser and Node.js compatibility
  • 📡 HTTP client: Built on top of axios
  • 🔄 JSONP support: Cross-origin requests in browsers, HTTP fallback in Node.js
  • 📦 Multiple formats: ES modules, CommonJS, UMD, IIFE, and ES5 compatible builds

Installation

npm install @millionfor/io

Usage

ES6/ES2015+ Environment

// ES modules
import io from '@millionfor/io';

// CommonJS
const io = require('@millionfor/io');

const instance = io.create();

ES5 Environment (Legacy Browsers)

// Use ES5 compatible build
import io from '@millionfor/io/es5';

// Or in CommonJS
const io = require('@millionfor/io/es5');

const instance = io.create();

UMD (Universal Module Definition)

// AMD
define(['@millionfor/io/umd'], function(io) {
  const instance = io.create();
});

// Global variable (browser)
const instance = Io.create();

IIFE (Immediately Invoked Function Expression)

<script src="@millionfor/io/iife"></script>
<script>
  const instance = Io.create();
</script>

API Examples

HTTP Requests

const instance = io.create({
  baseURL: 'https://api.example.com',
  timeout: 5000
});

// GET request
instance.get('/users')
  .then(data => console.log(data))
  .catch(err => console.error(err));

// POST request
instance.post('/users', { name: 'John', email: '[email protected]' })
  .then(data => console.log(data))
  .catch(err => console.error(err));

JSONP (Browser) / HTTP (Node.js)

// In browser: uses JSONP
// In Node.js: uses HTTP request
instance.jsonp('https://api.example.com/data', {
  current: 1,
  pageSize: 100
})
.then(data => console.log(data))
.catch(err => console.error(err));

Configuration

const instance = io.create({
  baseURL: 'https://api.example.com',
  timeout: 10000,
  headers: {
    'Authorization': 'Bearer token'
  },
  resolveURL: (url) => `/api/v1${url}`,
  cbSuccess: (data) => data.code === 0
});

Build Outputs

The package provides multiple build formats:

  • io.es.js - ES modules (ES6+)
  • io.cjs.js - CommonJS (Node.js)
  • io.umd.js - UMD (Universal)
  • io.iife.js - IIFE (Browser global)
  • io.es5.js - ES5 compatible (Legacy browsers)

Browser Support

  • Modern browsers: Chrome 50+, Firefox 50+, Safari 10+, Edge 12+
  • Legacy browsers: IE 9+, Chrome 30+, Firefox 30+, Safari 8+
  • Mobile: Android 4.4+, iOS 8+

Node.js Support

  • Node.js: 8.0.0+

Development

# Install dependencies
npm install

# Build all formats
npm run build

# Build ES5 only
npm run build:es5

# Build modern formats only
npm run build:modern

# Type checking
npm run type-check

# Clean build directory
npm run clean

License

MIT License