Skip to content

Extra attribute "default" when importing of the module  #18

Open
@Yettobecoder

Description

@Yettobecoder
let stringComparison = require('string-comparison').default;

// Log to see the structure of the cos object
console.log(Object.keys(stringComparison));

// output
[
  'cosine',
  'diceCoefficient',
  'jaccardIndex',
  'levenshtein',
  'lcs',
  'longestCommonSubsequence',
  'mlcs',
  'metricLcs',
  'jaroWinkler'
]

The module is not properly imported without the '.default' attribute. Maybe it's only a non-typeScript issue, but it's worth noting.

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