Skip to content

Calculate the value of guildwars2 items

License

Notifications You must be signed in to change notification settings

Ecmelt/item-value

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

item-value

Build Status Coverage Status

Calculate the value of guildwars2 items

This is part of gw2efficiency. Please report all issues in the central repository.

Install

npm install gw2e-item-value

This module can be used for Node.js as well as browsers using Browserify.

Usage

For better understanding of how and why this does things, please read the design document for the account value.

Calculate the item value

import {itemValue} from 'gw2e-account-value'

let item = {
  id: 1, 
  sell: {price: 1337, last_known: 1337}, 
  buy: {price: 12, last_known: 12}, 
  crafting: {buy: 10000}, 
  vendor_price: 5
  // ...
}

let value = itemValue(item)
// -> 1337

Get the inherited item

import {itemInherits} from 'gw2e-account-value'

let item = {id: 1, /* ... */}
let itemInheritance = itemInherits(item.id)
// -> [{id: 19721, count: 50}, {gold: 888888}]
// -> false for items that don't inherit value from other items

Tests

npm test

Licence

MIT

About

Calculate the value of guildwars2 items

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%