/**
* A factory function that will return a function, bound to a closure that holds an id property.
* Each time you call the function, it will decrement the id and return it to you. We decrement it
* so we are sure it never matches a traditional database key
*
* @return {function(): number}
*/
export default function() {
let id = 0;
return function() {
id--;
return id;
}
}