2

I was looking at the Nest.Js source code and i found an interesting snippet.

const uuid_1 = require("uuid");
const randomStringGenerator = () => (0, uuid_1.v4)();

I was wondering, what is the point of the 0 in the grouping operator?

  • This also feels like an excellent question to ask the nest.js folks, since it's open source and [their issue tracker](https://github.com/nestjs/nest/issues) is public. If it's their code, they're almost certainly the authority on why it's there. – Mike 'Pomax' Kamermans Jul 06 '22 at 20:34
  • 1
    Did you look at [the actual source code](https://github.com/nestjs/nest/blob/99ee3fd99341bcddfa408d1604050a9571b19bc9/packages/common/utils/random-string-generator.util.ts#L3), or at some transpiled build output? – Bergi Jul 06 '22 at 20:55

0 Answers0