https://github.com/jonnyburger/hash-the-timestamp
🔗⏱Tiny utility to hash the timestamp
https://github.com/jonnyburger/hash-the-timestamp
blockchain hash the timestamp
Last synced: over 1 year ago
JSON representation
🔗⏱Tiny utility to hash the timestamp
- Host: GitHub
- URL: https://github.com/jonnyburger/hash-the-timestamp
- Owner: JonnyBurger
- License: mit
- Created: 2018-06-21T08:10:14.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-21T10:43:28.000Z (about 8 years ago)
- Last Synced: 2025-04-14T08:50:16.762Z (over 1 year ago)
- Topics: blockchain, hash, the, timestamp
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/hash-the-timestamp
- Size: 115 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# hash-the-timestamp [](https://travis-ci.org/JonnyBurger/hash-the-timestamp) [](https://coveralls.io/github/JonnyBurger/hash-the-timestamp?branch=master)
> Tiny utility to hash the timestamp
A lightweight library to efficiently hash the timestamp.
* Simple API
* Uses secure SHA512 hashes
* Useful for blockchain
* Works in the browser and on the server
* Fully tested, 100% test coverage
## Install
```
$ npm install --save hash-the-timestamp
```
## Usage
```js
const hashTheTimestamp = require('hash-the-timestamp');
hashTheTimestamp(new Date('2018-06-20 10:00:00 UTC+1'));
//=> '3a8828cb5f8dbd44f3165f3e733aac831ed164c9665e8c6e2e1b728f61db97bb7d920e3510b3c48d1a03f323d1d13c982ac9de4f3ff277f6a6fb55e34cc62c97'
```
## API
### hashTheTimestamp(timestamp)
Return value: The hash of the timestamp
#### timestamp
Type: `number`
The timestamp you want to hash.
## Contributing
Pull requests welcome! Please include tests and follow the style conventions.
Run `npm test` to verify
## License
MIT © [Jonny Burger](https://jonny.io)