[Fixed] Trouble integrating accounting-js into a 1.3 project

This is the package I’m trying to integrate in my Meteor app:

Specifically this function:


First things first, I ran npm install accounting-js --save in my project folder. Everything goes well.

Here’s what it looks like:

Then I imported it in my file:

import formatMoney from 'lib/formatMoney.js' // Problem here!

export default class Format {
  static formatMoney(moneyInteger) {
    return formatMoney(moneyInteger);

The package itself seems really easy to use, I know I’m messing up somewhere, anyone have an idea how to integrate it?

Everytime I explain the problem in depth I find the solution lol.

import moment from 'moment';
import format from 'accounting-js';

export default class Format {
  static formatDate(date) {
    if (date && typeof date == "string") {
      return moment(date).fromNow();
    } else {
      return "A long time ago..."

  static formatMoneys(moneyInteger) {
    return format.formatMoney(moneyInteger);