Skip to content

Module Not Exported for NodeJS #4

Open
@PowerOfM

Description

@PowerOfM

The file micro-enum.js has no module.exports definition. Since this file is imported by index.js, the result is an empty object.

Test script:

const Enum = require('simple-enum')

var MyEnum = Enum('A', 'B', 'C')

When running that script:
TypeError: Enum is not a function

The REPL shows that Enum is an empty object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions