Wondering what’s next for npm?Check out our public roadmap! »

    util-get-getter-x

    1.0.2 • Public • Published

    Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

    util-get-getter-x

    Utility to get a getter.

    module.exportsFunction

    Utility to get a getter.

    Kind: Exported member
    Returns: * - The target.

    Param Type Description
    creator Function or object A creator function or a created object.
    getterName string The getter name.
    [validator] Function A function to validate the result.

    Example

    import getGetter from 'util-get-getter-x';
     
    const creator = function() {
      return new Map();
    };
     
    const validator = function(value) {
      return typeof value === 'number';
    };
     
    const getter = getGetter(creator, 'size', validator);

    Install

    npm i util-get-getter-x

    DownloadsWeekly Downloads

    16

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    307 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar