Socket
Socket
Sign inDemoInstall

washyourmouthoutwithsoap

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

washyourmouthoutwithsoap - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

15

bin/build.js

@@ -14,2 +14,3 @@ const argv = require('yargs').argv;

const LOCALES = ['sq','hy','eu','be','bg','ca','hr','cs','da','nl','en','et','fi','fr','gl','de','el','hi','hu','is','id','it','ja','kn','ko','la','lv','lt','mk','ms','ml','mt','mr','mn','my','fa','pl','pt','ro','ru','gd','sr','sk','sl','es','sv','te','th','tr','uk','uz','vi','cy','zu'];
const BASE_LOCALE = 'en';
const DELIMITER = ':';

@@ -33,4 +34,16 @@ const ERROR_CREDENTIALS = 'Invalid credentials';

// Explicitly set source and destination languages
const options = {
from: BASE_LOCALE,
to: job.locale
};
// For output in the base locale, do not translate
if (job.locale === BASE_LOCALE) {
db.put(key, job.word.toLowerCase(), callback);
return;
}
// Translate
client.translate(job.word, job.locale, (err, result) => {
client.translate(job.word, options, (err, result) => {
if (err) return callback(err);

@@ -37,0 +50,0 @@ if (typeof result !== 'string') return callback();

2

package.json
{
"name": "washyourmouthoutwithsoap",
"version": "1.0.1",
"version": "1.0.2",
"description": "A list of bad words in many languages.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -73,1 +73,11 @@ const test = require('tap').test;

});
test('no false positives for common words', t => {
const upResult = wash.check('en', 'what is up with that?');
t.type(upResult, 'boolean');
t.false(upResult);
const commentResult = wash.check('fr', 'comment vas-tu?');
t.type(commentResult, 'boolean');
t.false(commentResult);
t.end();
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc