Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 2445825

Browse files
committed
Added note about usage to README.md (fixes #49)
1 parent 837f07a commit 2445825

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ Intl.js is also available as a [Bower](http://bower.io) component for the front-
2121

2222
For other setups, just clone the repo for the pre-built scripts and locale datafiles.
2323

24+
In browser environments, the library will be defined as `IntlPolyfill` and not
25+
`Intl`. An example of usage _might_ look like this:
26+
27+
```javascript
28+
var nf = new (Intl || IntlPolyfill).NumberFormat(undefined, {style:'currency', currency:'GBP'});
29+
document.getElementById('price').textContent = nf.format(100);
30+
```
31+
2432
## <a id=status></a>Status
2533
The latest test, run on January 10 2013, scored 111 out of 111<sup>\*</sup> in Node.js.
2634

0 commit comments

Comments
 (0)