Package Exports
- @ecomplus/utils
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ecomplus/utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ecomplus-utils
JS utility functions to E-Com Plus (not only) related apps
Usage
The @ecomplus/utils
package provides a
list of methods,
each one is a utility function related to e-commerce apps
and E-Com Plus APIs and schemas.
It's available for both Node.js and browser environments, and can also be imported entirely or partially with ES modules.
import {
i18n,
formatMoney,
minQuantity,
price,
// ...
} from '@ecomplus/utils'
i18n({ en_us: 'Hello', pt_br: 'Olá' })
// => 'Hello'
formatMoney(10)
// => $10.00
Development
We're using Conventional Commits, all commit messages must follow these conventions.
For documentation, we're using jsdoc, all methods should be well documented.
Contributing
Fork the repository;
Create a new branch with the name of your proposal;
Clone the repository:
git clone git@github.com:{user}/ecomplus-utils.git
- Move to folder and install dependencies:
cd ecomplus-utils
npm i
- Run dev server and use global
ecomUtils
or edittest/demo.js
for tests on http://localhost:9314/:
npm run serve
Commit changes following Conventional Commits;
Create a new PR describing your proposal :)
Deploy
Take a look on package.json
scripts:
npm run doc
- Update jsdoc/docdash generated documentation;npm run release
- Generate changelog and new version;