We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a14b0e2 commit b4e8ea4Copy full SHA for b4e8ea4
src/scripts/util.js
@@ -1,14 +1,16 @@
1
import createUUID from 'uuid';
2
3
-let assetRoot = '/assets';
+export const uuid =
4
+ process.env.NODE_ENV === 'test' ?
5
+ () => '$uuid$' :
6
+ createUUID;
7
-export function uuid() {
- return process.env.NODE_ENV === 'test' ? '$uuid$' : createUUID();
-}
8
+export const getToday =
9
10
+ () => '2017-02-23' :
11
+ () => new Date().toISOString().substring(0, 10);
12
-export function getToday() {
- return process.env.NODE_ENV === 'test' ? '2017-02-23' : new Date().toISOString().substring(0, 10);
13
+let assetRoot = '/assets';
14
15
export function setAssetRoot(path) {
16
assetRoot = path;
0 commit comments