@comparaonline/ui-offer-entity-formatter

yarn add @comparaonline/ui-offer-entity-formatter

Usage no npm install needed!

<script type="module">
  import comparaonlineUiOfferEntityFormatter from 'https://cdn.skypack.dev/@comparaonline/ui-offer-entity-formatter';
</script>

README

@comparaonline/ui-offer-entity-formatter

Installation

yarn add @comparaonline/ui-offer-entity-formatter

Usage

import { entityFormatter } from '@comparaonline/ui-offer-entity-formatter';

const value = 10; // number, percentage
const type = 'number';
const format = {...};
formatter(value, type, format);

Supported entity types

  • string
  • number
  • money
  • percentage