diff --git a/package.json b/package.json index d1e3868..f7218d9 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wordpos", - "version": "2.0.0-beta.14", + "version": "2.0.0-beta.15", "description": "wordpos is a set of part-of-speech utilities for Node.js & browser using the WordNet database.", "author": "Moos ", "keywords": [ diff --git a/src/browser/index.js b/src/browser/index.js index c2f6cdc..f2cf51e 100644 --- a/src/browser/index.js +++ b/src/browser/index.js @@ -7,7 +7,7 @@ * Released under MIT license */ -const { stopwords, prepText, makeStopwordString } = require('../util'); +const { stopwords, prepText, makeStopwordString, flat } = require('../util'); const { is, get, getPOS, lookup, seek, lookupPOS } = require('../common'); const { randX, rand } = require('../rand'); const IndexFile = require('./indexFile'); @@ -69,7 +69,7 @@ class WordPOS { let promise = this._preload(this.indexFiles, pos); if (this.options.includeData) { promise = Promise.all([].concat(promise, this._preload(this.dataFiles, pos))) - .then(res => res.flat()); + .then(res => flat(res)); } return promise; }