1 | var fs = require('fs');
|
2 | var getIntersection = require('./get-intersection');
|
3 |
|
4 | var parsers = {
|
5 | account : function(reqBody) {
|
6 | return {
|
7 | accountId : reqBody.accountId || genId()
|
8 | }
|
9 | }
|
10 | }
|
11 |
|
12 | function genId() {
|
13 | return (Math.floor(Math.random() * 100000) + 1000000);
|
14 | }
|
15 |
|
16 |
|
17 | module.exports = function(mockGeneratorName){
|
18 | return parsers[mockGeneratorName] || function(){return {}};
|
19 | }; |
\ | No newline at end of file |