natural 6.11.0 → 6.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"attr1":"val1","attr2":"val2"}
|
|
@@ -3,6 +3,7 @@ require('dotenv').config()
|
|
|
3
3
|
const memjs = require('memjs')
|
|
4
4
|
const memCachedConnectionString = process.env.MEM_HOST + ':' +
|
|
5
5
|
process.env.MEM_PORT
|
|
6
|
+
const memCachedExpiration = process.env.MEM_EXPIRES || 2
|
|
6
7
|
|
|
7
8
|
// Class for creating memcached client including store and retrieve methods
|
|
8
9
|
class MemcachedPlugin {
|
|
@@ -13,7 +14,7 @@ class MemcachedPlugin {
|
|
|
13
14
|
async store (object, options) {
|
|
14
15
|
const key = uuidv4()
|
|
15
16
|
const data = JSON.stringify(object)
|
|
16
|
-
const isStored = await this.client.set(key, data, { expires:
|
|
17
|
+
const isStored = await this.client.set(key, data, { expires: memCachedExpiration })
|
|
17
18
|
return isStored ? key : null
|
|
18
19
|
}
|
|
19
20
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "natural",
|
|
3
3
|
"description": "General natural language (tokenizing, stemming (English, Russian, Spanish), part-of-speech tagging, sentiment analysis, classification, inflection, phonetics, tfidf, WordNet, jaro-winkler, Levenshtein distance, Dice's Coefficient) facilities for node.",
|
|
4
|
-
"version": "6.11.
|
|
4
|
+
"version": "6.11.1",
|
|
5
5
|
"homepage": "https://github.com/NaturalNode/natural",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|