poe-mods
    TypeScript icon, indicating that this package has built-in type declarations

    1.12.0 • Public • Published

    Path of Exile Mods

    Build Status Coverage Status dependencies Status devDependencies Status Greenkeeper badge

    Emulates interaction of Mods with Items, Atlas etc. in Path of Exile@3.3.0.

    Install

    $ npm install --save poe-mods

    Usage

    Typescript is supported.

    import { createItems, createMods, Transmute } from 'poe-mods';
     
    // data has to be provided. see eps1lon/poedb
    Promise.all([
      fetch('/items.json')
        .then(body => body.json())
        .then(props => createItems(props))
        .then(items => {
          return items.from(item => {
            return item.name === 'Iron Greaves';
          });
        }),
      fetch('/mods.json')
        .then(body => body.json())
        .then(props => createMods(props))
        .then(mods => Transmute.build(mods.all())),
    ]).then(([greaves, transmute]) => {
      console.log(transmute.modsFor(greaves).map(({ mod }) => mod)); // => GeneratorDetails[]
      console.log(transmute.applyTo(greaves)); // => Item
    });

    Data

    Data for for the create* helpers can be imported from poe-mods/data/.

    If you want to use the data somewhere else you can use https://unpkg.com/poe-mods@/data/. The data provided by unpkg supports compression.

    Immutability

    To provide the best support for redux every class is immutable.

    declare var item: Item;
     
    item.setRaritiy('magic') === item // false
     
    item.addMod(someMod) === item // false

    Documentation

    Contributing

    Issue reports and pull requests are always welcome.

    When you contribute code please make sure that it passes the test, lint and format checks. Pull requests should be made against the master branch and Travis will inform you wheather all checks have passed.

    License

    MIT

    Keywords

    Install

    npm i poe-mods

    DownloadsWeekly Downloads

    62

    Version

    1.12.0

    License

    MIT

    Unpacked Size

    19.1 MB

    Total Files

    516

    Last publish

    Collaborators

    • eps1lon