neo4-js
Version:
Neo4j graphdb object graph mapper for javascript
21 lines (20 loc) • 648 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
class CharGenerator {
constructor() {
this.startChar = "a";
this.start = (value) => (this.startChar = value);
this.next = () => {
const char = this.startChar;
this.startChar = (parseInt(this.startChar, 36) + 1)
.toString(36)
.replace(/10/g, "aa")
.replace(/0/g, "a");
if (this.startChar === "zzzz")
this.startChar = "a";
return char;
};
}
}
exports.CharGenerator = CharGenerator;
exports.default = new CharGenerator();
;