File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33const csvStringify = require ( 'csv-string' ) . stringify
44const hashFunction = require ( './hash-function' )
5+ const uuidFunction = require ( './uuid-function' )
56
67class Transformer {
78 constructor ( fileConfig ) {
@@ -19,6 +20,9 @@ class Transformer {
1920 case 'hash' :
2021 _this . columnFunctions . push ( hashFunction )
2122 break
23+ case 'uuid' :
24+ _this . columnFunctions . push ( uuidFunction )
25+ break
2226 default :
2327 console . error ( 'ERROR: Unknown outputColumnType ' + outputColumnType )
2428 }
Original file line number Diff line number Diff line change 1+ const uuidV4 = require ( 'uuid/v4' ) ;
2+
3+ module . exports = function uuidFunction ( ) {
4+ return uuidV4 ( )
5+ }
Original file line number Diff line number Diff line change 3232 "lodash" : " 4.17.10" ,
3333 "make-dir" : " 1.3.0" ,
3434 "pump" : " 3.0.0" ,
35- "upath" : " 1.1.0"
35+ "upath" : " 1.1.0" ,
36+ "uuid" : " ^3.3.2"
3637 },
3738 "devDependencies" : {
3839 "chai" : " 4.1.2" ,
You can’t perform that action at this time.
0 commit comments