Skip to content

Strange exports of module in node #3

Description

@clemsos

After install with NPM npm install guesslanguage
I have strange behaviour when importing.
Seems like the module exports a JS object so i have to duplicate and write guessLanguage.guessLanguage.detect

here an example in coffeescript

guessLanguage = require 'guesslanguage'
guessLanguage.guessLanguage.detect text, (language) ->
        console.log "language is : "+language

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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