libram 0.9.18 → 0.9.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { cliExecute, Familiar, splitModifiers, visitUrl } from "kolmafia";
2
- import { getFamiliarTags, have as haveItem } from "../../lib.js";
2
+ import { getFamiliarTags, have as have_ } from "../../lib.js";
3
3
  import { get } from "../../property.js";
4
4
  import { $item } from "../../template-string.js";
5
5
  import { parseModifiers } from "../../modifier.js";
@@ -9,7 +9,7 @@ import { maxBy } from "../../utils.js";
9
9
  * @returns Whether you have the tiny stillsuit
10
10
  */
11
11
  export function have() {
12
- return haveItem($item `tiny stillsuit`);
12
+ return have_($item `tiny stillsuit`);
13
13
  }
14
14
  /**
15
15
  * @returns the expected adventures from drinking stillsuit distillate
@@ -114,7 +114,7 @@ export function modifierRatio(familiar) {
114
114
  const tags = getFamiliarTags(familiar);
115
115
  return tags.filter(isStillsuitTag).reduce((acc, tag) => ({
116
116
  ...acc,
117
- [MODIFIER_TAGS[tag]]: ((acc[MODIFIER_TAGS[tag]] ?? 0) + 1) / tags.length,
117
+ [MODIFIER_TAGS[tag]]: (acc[MODIFIER_TAGS[tag]] ?? 0) + 1 / tags.length,
118
118
  }), {});
119
119
  }
120
120
  /**
@@ -123,5 +123,5 @@ export function modifierRatio(familiar) {
123
123
  * @returns The familiar you currently `have` that returns the best stillsuit distillate for that modifier.
124
124
  */
125
125
  export function bestFamiliar(modifier) {
126
- return maxBy(Familiar.all().filter(have), (familiar) => modifierRatio(familiar)[modifier] ?? 0);
126
+ return maxBy(Familiar.all().filter(have_), (familiar) => modifierRatio(familiar)[modifier] ?? 0);
127
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libram",
3
- "version": "0.9.18",
3
+ "version": "0.9.19",
4
4
  "description": "JavaScript helper library for KoLmafia",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",