Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elo7/format-amd
Library to convert string to number in vice versa
https://github.com/elo7/format-amd
amd formatter front-end javascript lib martell nymeros
Last synced: about 2 months ago
JSON representation
Library to convert string to number in vice versa
- Host: GitHub
- URL: https://github.com/elo7/format-amd
- Owner: elo7
- License: bsd-3-clause
- Created: 2014-12-01T19:01:38.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-14T16:56:26.000Z (5 months ago)
- Last Synced: 2024-11-14T20:14:37.821Z (about 2 months ago)
- Topics: amd, formatter, front-end, javascript, lib, martell, nymeros
- Language: JavaScript
- Homepage:
- Size: 143 KB
- Stars: 2
- Watchers: 102
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Format-amd
_Format-amd string/number library_
Format.js is a library that converts string to number or the opposite. This library uses [amd](http://en.wikipedia.org/wiki/Asynchronous_module_definition) structure. Currently, we support currency formats.
[![Build Status](https://travis-ci.org/elo7/format-amd.svg?branch=master)](https://travis-ci.org/elo7/format-amd)
## Install
Install : `npm install elo7-format-amd`
## Dependency
Format-amd depends on an [amd](http://en.wikipedia.org/wiki/Asynchronous_module_definition) implementation. We suggest [define-async](https://www.npmjs.com/package/define-async) implementation for dependency lookup.
## Example
``` js
define(['format'], function(format) {
format.currency(17.2, 'R$'); // Returns R$ 17,20
format.currencyToNumber('R$ 9,50'); // Returns 9.5
});
```## License
Format-amd is released under the [BSD](https://github.com/elo7/format-amd/blob/master/LICENSE). Have at it.
* * *
Copyright :copyright: 2014 Elo7