updated docs

This commit is contained in:
Wyatt Johnson
2017-10-11 15:32:25 -06:00
parent 09ecd2a055
commit 97eee92499
23 changed files with 494 additions and 226 deletions
@@ -5,5 +5,8 @@
"description": "Provides support for measuring the toxicity of user comments using the Perspectives API",
"main": "index.js",
"author": "The Coral Project Team <coral@mozillafoundation.org>",
"license": "Apache-2.0"
"license": "Apache-2.0",
"dependencies": {
"ms": "^2.0.0"
}
}
@@ -1,8 +1,10 @@
const ms = require('ms');
const config = {
API_ENDPOINT: process.env.TALK_PERSPECTIVE_API_ENDPOINT || 'https://commentanalyzer.googleapis.com/v1alpha1',
API_KEY: process.env.TALK_PERSPECTIVE_API_KEY,
THRESHOLD: process.env.TALK_TOXICITY_THRESHOLD || 0.8,
API_TIMEOUT: process.env.TALK_PERSPECTIVE_TIMEOUT || 300,
API_TIMEOUT: ms(process.env.TALK_PERSPECTIVE_TIMEOUT || '300ms'),
};
if (process.env.NODE_ENV !== 'test' && !config.API_KEY) {
@@ -2,3 +2,6 @@
# yarn lockfile v1
ms@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"