Skip to content

Commit

Permalink
tweaks to README
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jan 7, 2024
1 parent 880a32f commit 89a4070
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions packages/temporal-polyfill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Only 20.0 kB, with near-perfect [spec compliance](#spec-compliance).
npm install temporal-polyfill
```

**Import as an ES module** without side effects:
Import as an ES module without side effects:

```js
import { Temporal } from 'temporal-polyfill'

console.log(Temporal.Now.zonedDateTimeISO().toString())
```

Or, **import globally:**
Or, import globally:

```js
import 'temporal-polyfill/global'
Expand Down Expand Up @@ -116,28 +116,22 @@ Use a `<script>` tags with a CDN link:
<tr>
<td>Global usage in ESM/CJS</td>
<td>
<code>
import 'temporal-polyfill/global'; // ESM<br />
require('temporal-polyfill/global'); // CJS
</code>
<pre><code>import 'temporal-polyfill/global'; // ESM
require('temporal-polyfill/global'); // CJS</code></pre>
</td>
<td>Not currently possible</td>
</tr>
<tr>
<td>Global usage directly in browser</td>
<td>
<code>
&lt;script&gt;<br />
&nbsp;&nbsp;Temporal.Now.zonedDateTimeISO()<br />
&lt;/script&gt;
</code>
<pre><code>&lt;script&gt;
&nbsp;&nbsp;Temporal.Now.zonedDateTimeISO()
&lt;/script&gt;</code></pre>
</td>
<td>
<code>
&lt;script&gt;<br />
&nbsp;&nbsp;temporal.Temporal.Now.zonedDateTimeISO()<br />
&lt;/script&gt;
</code>
<pre><code>&lt;script&gt;
&nbsp;&nbsp;temporal.Temporal.Now.zonedDateTimeISO()
&lt;/script&gt;</code></pre>
</td>
</tr>
</table>
Expand Down

0 comments on commit 89a4070

Please sign in to comment.