@ecomplus/utils

JS utility functions for E-Com Plus (not only) related apps. GitHub
Source:
Author:
See:
Examples
// Import all utility methods with ES
import ecomUtils from '@ecomplus/utils'
// Named ES imports with some sample methods
import {
  i18n,
  formatMoney,
  minQuantity,
  price,
  // ...
} from '@ecomplus/utils'
// Import only config object
import { $ecomConfig } from '@ecomplus/utils'
// With CommonJS
const ecomUtils = require('@ecomplus/utils')
// CommonJS require standalone methods
const i18n = require('@ecomplus/utils/dist/methods/i18n')
const formatMoney = require('@ecomplus/utils/dist/methods/format-money')
// ...
// require(`@ecomplus/utils/dist/methods/${kebab-case-method-name}`)
<!-- Globals `ecomUtils` and `$ecomConfig` from CDN on browser -->
<script src="https://cdn.jsdelivr.net/npm/@ecomplus/utils/dist/ecom-utils.polyfill.min.js"></script>
Returns: