/** * Created by jsugg on 9/22/16. */ // import { v4 } from 'node-uuid'; // // export const newBaDmId = () => { return v4() }; export const newBaDmId = () => { return guid(); } function guid() { function s4() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); }