Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 21, 2020
1 parent 34e9060 commit 83e00ac
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ES6 `String.fromCodePoint` polyfill [![Build status](https://travis-ci.org/mathiasbynens/String.fromCodePoint.svg?branch=master)](https://travis-ci.org/mathiasbynens/String.fromCodePoint) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/String.fromCodePoint/master.svg)](https://coveralls.io/r/mathiasbynens/String.fromCodePoint)

An robust & optimized ES3-compatible polyfill for [the `String.fromCodePoint` method in ECMAScript 6](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint).
An robust & optimized polyfill for [the `String.fromCodePoint` method in ECMAScript 6](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.fromcodepoint).

This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://tc39.es/ecma262/#sec-string.fromcodepoint).

Other polyfills for `String.fromCodePoint` are available:

Expand All @@ -10,12 +12,6 @@ Other polyfills for `String.fromCodePoint` are available:

## Installation

In a browser:

```html
<script src="fromcodepoint.js"></script>
```

Via [npm](http://npmjs.org/):

```bash
Expand All @@ -25,13 +21,20 @@ npm install string.fromcodepoint
Then, in [Node.js](http://nodejs.org/):

```js
require('string.fromcodepoint');
var fromCodePoint = require('string.fromcodepoint');
```

In a browser:

// On Windows and on Mac systems with default settings, case doesn’t matter,
// which allows you to do this instead:
require('String.fromCodePoint');
```html
<script src="https://bundle.run/string.fromcodepoint"></script>
```

> **NOTE**: It's recommended that you install this module using a package manager
> such as `npm`, because loading multiple polyfills from a CDN (such as `bundle.run`)
> will lead to duplicated code.

## Notes

[A polyfill + test suite for `String.prototype.codePointAt`](https://mths.be/codepointat) is available, too.
Expand Down

0 comments on commit 83e00ac

Please sign in to comment.