https://github.com/lagden/hex-id
Creates an unique ID based on the system time
https://github.com/lagden/hex-id
hex lib nodejs objectid unique
Last synced: about 1 year ago
JSON representation
Creates an unique ID based on the system time
- Host: GitHub
- URL: https://github.com/lagden/hex-id
- Owner: lagden
- License: mit
- Created: 2019-01-23T19:21:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-13T19:04:49.000Z (almost 3 years ago)
- Last Synced: 2025-03-25T09:51:45.014Z (about 1 year ago)
- Topics: hex, lib, nodejs, objectid, unique
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@tadashi/hex-id
- Size: 944 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @tadashi/hex-id
[![NPM version][npm-img]][npm]
[![Build Status][ci-img]][ci]
[![Coverage Status][coveralls-img]][coveralls]
[npm-img]: https://img.shields.io/npm/v/@tadashi/hex-id.svg
[npm]: https://www.npmjs.com/package/@tadashi/hex-id
[ci-img]: https://github.com/lagden/hex-id/actions/workflows/nodejs.yml/badge.svg
[ci]: https://github.com/lagden/hex-id/actions/workflows/nodejs.yml
[coveralls-img]: https://coveralls.io/repos/github/lagden/hex-id/badge.svg?branch=master
[coveralls]: https://coveralls.io/github/lagden/hex-id?branch=master
Creates the unique ID based on the system time. (compatible with Mongo's ObjectID).
## Install
```
$ npm i @tadashi/hex-id
```
## Usage
This library can be used on the client or server side.
```js
import hexID from '@tadashi/hex-id'
hexID()
// => 5c48b2d79b156cb4effe05c8
hexID()
// => 5c48b2d79b156cb4effe05c9
```
## Team
[
](https://github.com/lagden)
## Donate ❤️
- BTC: bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4
## License
MIT © [Thiago Lagden](https://github.com/lagden)