Skip to content

Commit

Permalink
Prepare for v2.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 20, 2020
1 parent 78361ab commit 1ad3b81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ See [*locale*.format](#locale_format) for a detailed specification, and try runn

## Installing

If you use NPM, `npm install d3-format`. Otherwise, download the [latest release](https://github.com/d3/d3-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-format.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:
If you use NPM, `npm install d3-format`. Otherwise, download the [latest release](https://github.com/d3/d3-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-format.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:

```html
<script src="https://d3js.org/d3-format.v1.min.js"></script>
<script src="https://d3js.org/d3-format.v2.min.js"></script>
<script>
var format = d3.format(".2s");
Expand All @@ -81,7 +81,7 @@ var format = d3.format(".2s");
Locale files are published to npm and can be loaded using [d3.json](https://github.com/d3/d3-request/blob/master/README.md#json). For example, to set Russian as the default locale:

```js
d3.json("https://cdn.jsdelivr.net/npm/d3-format@1/locale/ru-RU.json", function(error, locale) {
d3.json("https://cdn.jsdelivr.net/npm/d3-format@2/locale/ru-RU.json", function(error, locale) {
if (error) throw error;

d3.formatDefaultLocale(locale);
Expand Down

0 comments on commit 1ad3b81

Please sign in to comment.