# to-iso-string-x

> Cross-browser toISOString support.

Latest version **2.1.2** (published 2019-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install to-iso-string-x
pnpm add to-iso-string-x
yarn add to-iso-string-x
bun add to-iso-string-x
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2019-08-28 |
| First published | 2017-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.11.4 |
| Dependencies | 7 |
| Unpacked size | 350.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Graham Fairweather |
| Maintainers | xotic750 |
| Keywords | date, toISOString, module, javascript, nodejs, browser |

## Links

- npm: https://www.npmjs.com/package/to-iso-string-x
- Repository: https://github.com/Xotic750/to-iso-string-x
- Issues: https://github.com/Xotic750/to-iso-string-x/issues
- npm.io page: https://npm.io/package/to-iso-string-x

## Dependencies (7)

- [attempt-x](https://npm.io/package/attempt-x.md) ^2.1.2
- [array-map-x](https://npm.io/package/array-map-x.md) ^3.1.2
- [to-boolean-x](https://npm.io/package/to-boolean-x.md) ^2.1.1
- [array-slice-x](https://npm.io/package/array-slice-x.md) ^4.2.2
- [is-date-object](https://npm.io/package/is-date-object.md) ^1.0.1
- [simple-methodize-x](https://npm.io/package/simple-methodize-x.md) ^1.0.4
- [string-pad-start-x](https://npm.io/package/string-pad-start-x.md) ^2.1.2

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 2.1.2 (latest) — 2019-08-28
- 2.1.1 — 2019-08-20
- 2.1.0 — 2019-08-14
- 2.0.15 — 2019-08-05
- 2.0.12 — 2019-08-05
- 2.0.11 — 2019-07-31
- 2.0.10 — 2019-07-27
- 2.0.9 — 2019-07-26
- 2.0.8 — 2019-07-25
- 2.0.7 — 2019-07-24
- 2.0.6 — 2019-07-24
- 2.0.5 — 2019-07-22
- 2.0.4 — 2019-07-21
- 2.0.3 — 2019-07-19
- 2.0.2 — 2019-07-18
- … 8 more at https://npm.io/package/to-iso-string-x/versions

## README

<a
  href="https://travis-ci.org/Xotic750/to-iso-string-x"
  title="Travis status">
<img
  src="https://travis-ci.org/Xotic750/to-iso-string-x.svg?branch=master"
  alt="Travis status" height="18">
</a>
<a
  href="https://david-dm.org/Xotic750/to-iso-string-x"
  title="Dependency status">
<img src="https://david-dm.org/Xotic750/to-iso-string-x/status.svg"
  alt="Dependency status" height="18"/>
</a>
<a
  href="https://david-dm.org/Xotic750/to-iso-string-x?type=dev"
  title="devDependency status">
<img src="https://david-dm.org/Xotic750/to-iso-string-x/dev-status.svg"
  alt="devDependency status" height="18"/>
</a>
<a
  href="https://badge.fury.io/js/to-iso-string-x"
  title="npm version">
<img src="https://badge.fury.io/js/to-iso-string-x.svg"
  alt="npm version" height="18">
</a>
<a
  href="https://www.jsdelivr.com/package/npm/to-iso-string-x"
  title="jsDelivr hits">
<img src="https://data.jsdelivr.com/v1/package/npm/to-iso-string-x/badge?style=rounded"
  alt="jsDelivr hits" height="18">
</a>
<a
  href="https://bettercodehub.com/results/Xotic750/to-iso-string-x"
  title="bettercodehub score">
<img src="https://bettercodehub.com/edge/badge/Xotic750/to-iso-string-x?branch=master"
  alt="bettercodehub score" height="18">
</a>
<a
  href="https://coveralls.io/github/Xotic750/to-iso-string-x?branch=master"
  title="Coverage Status">
<img src="https://coveralls.io/repos/github/Xotic750/to-iso-string-x/badge.svg?branch=master"
  alt="Coverage Status" height="18">
</a>

<a name="module_to-iso-string-x"></a>

## to-iso-string-x

Cross-browser toISOString support.

<a name="exp_module_to-iso-string-x--module.exports"></a>

### `module.exports` ⇒ <code>string</code> ⏏

This method returns a string in simplified extended ISO format (ISO 8601),
which is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.sssZ or
±YYYYYY-MM-DDTHH:mm:ss.sssZ, respectively). The timezone is always zero UTC
offset, as denoted by the suffix "Z".

**Kind**: Exported member  
**Returns**: <code>string</code> - Given date in the ISO 8601 format according to universal time.  
**Throws**:

- <code>TypeError</code> If date is not a Date object.
- <code>RangeError</code> If date is invalid.

| Param | Type                | Description    |
| ----- | ------------------- | -------------- |
| date  | <code>Object</code> | A Date object. |

**Example**

```js
import toISOString =from 'to-iso-string-x';

toISOString(new Date(0)); // '1970-01-01T00:00:00.000Z'
```

---
_Source: https://npm.io/package/to-iso-string-x · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
