You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test2.js 394 B

1234567891011121314151617181920
  1. const GenId = require('..')
  2. function test1() {
  3. const genid = new GenId({ WorkerId: 1 })
  4. for (let index = 0; index < 5000; index++) {
  5. console.log(genid.NextId());
  6. }
  7. }
  8. function test2() {
  9. const genid = new GenId({ WorkerId: 1 })
  10. const id = genid.NextId()
  11. console.log(typeof (id))
  12. console.log(id, id.toString().length)
  13. }
  14. function main() {
  15. test2()
  16. }
  17. main()