airk

    0.0.107 • Public • Published

    airk

    Install

    $ yarn add airk

    Usage

    Type

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

    Functional

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

    Event

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

    Promise

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

    String

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

    Performance

    import debounce from 'airk/debounce';
    import throttle from 'airk/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

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

    Keywords

    none

    Install

    npm i airk

    DownloadsWeekly Downloads

    0

    Version

    0.0.107

    License

    MIT

    Unpacked Size

    22.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • edonet