UNPKG

@eastsideco/escshopify

Version:

WIP JS library for Shopify, containing a variety of useful functionality.

18 lines (16 loc) 413 B
/** * Formats currencies. * This is an abstract class which formatters should extend from. * @public */ export default class Formatter { /** * Format a currency. * @param {type} amount - Amount in cents. * @param {type} currency - Currency code to convert to. * @return {String} */ format(amount, currency) { throw Error('Formatter should implement format'); } }