Skip to content

Commit 403cbbc

Browse files
committed
Add uuid helper method to 'mu'
1 parent e766bb7 commit 403cbbc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

helpers/mu/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import app from './server';
22
import sparql from './sparql';
3+
import uuidV1 from 'uuid/v1';
4+
5+
// generates a uuid
6+
const uuid = uuidV1;
37

48
const mu = {
59
app: app,
610
sparql: sparql,
711
SPARQL: sparql.sparql,
812
query: sparql.query,
913
update: sparql.update,
14+
uuid: uuid
1015
}
1116

1217
const SPARQL = mu.SPARQL, query = mu.query, update = mu.update;
1318

14-
export { app , sparql, SPARQL, query, update };
19+
export { app , sparql, SPARQL, query, update, uuid };
1520
export default mu;

helpers/mu/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"babel-preset-es2015": "^6.18.0",
1111
"babel-preset-es2016": "^6.16.0",
1212
"babel-preset-es2017": "^6.16.0",
13-
"supervisor": "^0.12.0"
13+
"supervisor": "^0.12.0",
14+
"uuid": "^3.0.0"
1415
}
1516
}

0 commit comments

Comments
 (0)