Skip to content

Commit 06375a7

Browse files
committed
Merge pull request #5 from tomekwi/patch-1
Another ponyfill :)
2 parents 7e32b26 + 5e6d38a commit 06375a7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33

44
### Usage
55

6-
If you want to make sure your environment implements `Map`, do:
6+
It’s safest to use *es6-map* as a [ponyfill](http://kikobeats.com/polyfill-ponyfill-and-prollyfill/) – a polyfill which doesn’t touch global objects:
77

88
```javascript
9-
require('es6-map/implement');
9+
var Map = require('es6-map');
1010
```
1111

12-
If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `Map` on global scope, do:
12+
If you want to make sure your environment implements `Map` globally, do:
1313

1414
```javascript
15-
var Map = require('es6-map');
15+
require('es6-map/implement');
1616
```
1717

18-
If you strictly want to use polyfill even if native `Map` exists, do:
18+
If you strictly want to use the polyfill even if the native `Map` exists, do:
1919

2020
```javascript
2121
var Map = require('es6-map/polyfill');

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"hash",
1313
"map",
1414
"polyfill",
15+
"ponyfill",
1516
"ecmascript"
1617
],
1718
"repository": {

0 commit comments

Comments
 (0)