-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.md.rx
50 lines (31 loc) · 1.29 KB
/
README.md.rx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Timenames
Timenames provides you with a unique name for each second of the day.
You can see a demo [here](https://timenames.redpapr.com/).
I am using {{ gh.link("iaseth/readmix", "readmix") }} for generating this README.
You can view the source file [here](https://github.com/iaseth/timenames/blob/master/README.md.rx).
## How it started
I was working on a [sound recorder app](https://github.com/iaseth/rex)
that gave a default filename to each recording based on the current time.
I extracted the naming logic into a separate npm package called
[timenames](https://www.npmjs.com/package/timenames) and added a
[demo react app](https://timenames.redpapr.com/) for previewing.
![Timenames Demo](res/one-minute-demo.gif)
## How to use timenames in your project
Install the {{ "timenames" | NpmLink }} npm package:
=> npm install timenames
Import the `getTimeName()` function:
=> import { getTimeName } from "timenames";
Call the `getTimeName()` function to get a `timename`:
=> const timename = getTimeName();
You can optionally pass a time prop to get a `timename` for a specific time:
```
const t = Date.now();
const timename = getTimeName(t);
```
## Dependencies
{{ npm.dependencyTable() }}
## Dev dependencies
{{ npm.devDependencyTable() }}
## License
{{ "LICENSE.md" | File }}
{{ giveCredit() }}