Skip to content

Drop the default export? #370

@ctavan

Description

@ctavan

In uuid@3.x the Version 4 algorithm was exported as a default:

const uuid = require('uuid');
uuid(); // -> "2b0d20b0-6462-4738-abe6-413512e9fbf2"

In the current master this is no longer the case:

const uuid = require('uuid');
uuid(); // -> Uncaught TypeError: uuid is not a function
uuid.v4() // -> "ea58b65b-80c4-44c6-b482-6714c78ac43e"

The minimum we should probably do is describe this in the README and in the CHANGELOG.

I could also try to use the data from https://github.com/tc39/proposal-uuid/tree/master/analysis in order to try to figure out how much of a breakage removing the default export would be?!

What do you think about this breaking change @broofa?

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