Skip to content

README incorrectly defines msecs #248

@rmm5t

Description

@rmm5t

The README docs for the v1() options states:

msecs - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.

But Date instances do not work as expected. Only millisecond values do:

> uuid.v1({ msecs: new Date() })
'00000000-0000-1000-b5d5-0d7fa4a8285e'

> uuid.v1({ msecs: new Date().getTime() })
'3a7ea410-effa-11e7-b5d5-0d7fa4a8285e'

I'm happy to submit a PR to fix this, but is this something where you would like the README to be corrected, or would you like the v1() implementation to accept Date instances for the msecs option?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions