election-utils
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -972,6 +972,7 @@ import orderBy from 'lodash.orderby'; | ||
* | ||
* @param {Array} $0.timestamp a timestamp | ||
* @param {String} $0.timestamp a timestamp | ||
* @returns {String} the formatted timestamp | ||
* @example | ||
* | ||
* import { formatTimestamp } from 'election-utils' | ||
* formatTimestamp(results) //=> 'Mar 1 2:26 PM EST' | ||
*/ | ||
@@ -978,0 +979,0 @@ function formatTimestamp(_ref) { |
@@ -977,6 +977,7 @@ 'use strict'; | ||
* | ||
* @param {Array} $0.timestamp a timestamp | ||
* @param {String} $0.timestamp a timestamp | ||
* @returns {String} the formatted timestamp | ||
* @example | ||
* | ||
* import { formatTimestamp } from 'election-utils' | ||
* formatTimestamp(results) //=> 'Mar 1 2:26 PM EST' | ||
*/ | ||
@@ -983,0 +984,0 @@ function formatTimestamp(_ref) { |
19
doc.md
@@ -185,2 +185,21 @@ # Candidate | ||
# formatTimestamp | ||
Format timestamp. | ||
Useful for displaying `last updated`. | ||
**Parameters** | ||
- `$0.timestamp` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** a timestamp | ||
- `_ref` | ||
**Examples** | ||
```javascript | ||
import { formatTimestamp } from 'election-utils' | ||
formatTimestamp(results) //=> 'Mar 1 2:26 PM EST' | ||
``` | ||
Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the formatted timestamp | ||
# parties | ||
@@ -187,0 +206,0 @@ |
{ | ||
"name": "election-utils", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "This module provides various utility functions for dealing with AP election data.", | ||
@@ -34,3 +34,2 @@ "main": "build/index.js", | ||
"faucet": "0.0.1", | ||
"lodash": "^4.5.1", | ||
"rimraf": "^2.5.0", | ||
@@ -37,0 +36,0 @@ "rollup": "^0.24.0", |
@@ -7,6 +7,7 @@ import dateFormat from 'dateformat' | ||
* | ||
* @param {Array} $0.timestamp a timestamp | ||
* @param {String} $0.timestamp a timestamp | ||
* @returns {String} the formatted timestamp | ||
* @example | ||
* | ||
* import { formatTimestamp } from 'election-utils' | ||
* formatTimestamp(results) //=> 'Mar 1 2:26 PM EST' | ||
*/ | ||
@@ -13,0 +14,0 @@ export default function formatTimestamp({ timestamp }) { |
88216
14
3252