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

ainb

v0.0.107

Published

ainb

Downloads

11

Readme

AinB

a library for Web;

Install

$ yarn add ainb

Usage

Type

import is from 'ainb/is';
import isArray from 'ainb/isArray';
import isArrayLike from 'ainb/isArrayLike';
import isBoolean from 'ainb/isBoolean';
import isFunction from 'ainb/isFunction';
import isNumber from 'ainb/isNumber';
import isNaturalNumber from 'ainb/isNaturalNumber';
import isNil from 'ainb/isNil';
import isObject from 'ainb/isObject';
import isString from 'ainb/isString';

Functional

import chain from 'ainb/chain';
import compose from 'ainb/compose';
import curry from 'ainb/curry';
import flow from 'ainb/flow';

Event

import EventEmitter from 'ainb/EventEmitter';
import observer, { Observer } from 'ainb/observer';
import dispatchEvent from 'ainb/dispatchEvent';

Promise

import promisify from 'ainb/promisify';
import defer from 'ainb/defer';
import delay from 'ainb/delay';

String

import uuid from 'ainb/uuid';
import base64 from 'ainb/base64';
import string from 'ainb/string';

Performance

import extend from 'ainb/extend';
import debounce from 'ainb/debounce';
import throttle from 'ainb/throttle';

API

Type

  • is(obj: any, type: string): boolean
  • isArray(obj: any): boolean
  • isArrayLike(obj: any): boolean
  • isBoolean(obj: any): boolean
  • isFunction(obj: any): boolean
  • isNumber(obj: any): boolean
  • isNaturalNumber(obj: any): boolean
  • isNil(obj: any): boolean
  • isObject(obj: any): boolea
  • isString(obj: any): boolea

Functional

  • chain(fn: function): function
  • compose(fn: function): function
  • curry(fn: function): function
  • flow(fn: function): function

Event

  • new EventEmitter()
  • new Observer()
  • dispatchEvent(cb: function, payload: object): boolean

Promise

  • promisify(fn: function): function
  • defer(): promise
  • delay(fn: function, duration: number): promise

String

  • uuid(): string
  • base64.encode(str: string): string
  • base64.decode(str: string): string
  • string.upperCase(str: string): string
  • string.lowerCase(str: string): string
  • string.isUpperCase(str: string): string
  • string.isLowerCase(str: string): string
  • string.words(str: string): string
  • string.camelCase(str: string): string
  • string.pascalCase(str: string): string
  • string.snakeCase(str: string): string
  • string.capitalize(str: string): string
  • string.upperFirst(str: string): string
  • string.lowerFirst(str: string): string

ForEach

  • each(ob: object, cb: function): boolean
  • map(ob: object, cb: function): object

Performance

  • extend(proto: object, [props: object]): object
  • debounce(cb: function, wait: number, [options: object]): function
  • throttle(cb: function, wait: number, [options: object]): function