scienceai / tsne-js

t-distributed stochastic neighbor embedding (t-SNE) algorithm implemented in JavaScript
https://scienceai.github.io/tsne-js
Apache License 2.0
243 stars 36 forks source link

Default export for non ES6 require? #2

Open vorg opened 8 years ago

vorg commented 8 years ago

The example suggest the ES6 module import

import TSNE from 'tsne-js';

Although if I want to use commonjs require i have to do:

//var TSNE = require('tsne-js'); //dowan't work
var TSNE = require('tsne-js').default; 
transcranial commented 8 years ago

yeah, I agree that's a bit annoying - should be fixed with latest v1.0.3!