Skip to content

Commit

Permalink
Merge pull request #7 from hckrnews/feature/update-dependencies
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
w3nl committed Jul 2, 2020
2 parents 03edbf4 + a9e7dc1 commit a755c6d
Show file tree
Hide file tree
Showing 13 changed files with 9,233 additions and 10,977 deletions.
35 changes: 19 additions & 16 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,35 @@ module.exports = {
env: {
es6: true,
node: true,
browser: true
browser: true,
},
extends: ['@hckrnews/eslint-config'],
parserOptions: {
sourceType: "module",
parser: "babel-eslint",
sourceType: 'module',
parser: 'babel-eslint',
babelOptions: {
configFile: "babel.config.js",
}
configFile: 'babel.config.js',
},
},
rules: {
"import/extensions": ['error', {
"js": "never",
"mjs": "always",
"json": "always"
}]
'import/extensions': [
'error',
{
js: 'never',
mjs: 'always',
json: 'always',
},
],
},
overrides: [
{
files: [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true
}
}
]
jest: true,
},
},
],
};
20,123 changes: 9,188 additions & 10,935 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hckrnews/truth-table",
"version": "2.2.0",
"version": "2.2.1",
"description": "Generate a truth table very easy.",
"main": "src/TruthTable.mjs",
"files": [
Expand Down Expand Up @@ -33,12 +33,12 @@
"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@hckrnews/eslint-config": "^0.2.0",
"@hckrnews/eslint-config": "^1.0.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.1.0",
"codecov": "^3.6.5",
"coveralls": "^3.0.13",
"eslint": "^6.6.0",
"eslint": "^7.3.1",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-html": "^6.0.2",
Expand All @@ -49,7 +49,7 @@
"eslint-plugin-vue": "^6.2.2",
"jest": "^26.1.0",
"jscpd": "^3.2.1",
"prettier": "1.19.1"
"prettier": "^2.0.5"
},
"repository": {
"type": "git",
Expand All @@ -64,6 +64,6 @@
"truth table"
],
"dependencies": {
"@hckrnews/logic-gates": "^2.0.0"
"@hckrnews/logic-gates": "^2.0.2"
}
}
4 changes: 2 additions & 2 deletions src/AndTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class AndTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => and(row));
this.result = this.inputs.map(row => [and(row), ...row]);
this.output = this.inputs.map((row) => and(row));
this.result = this.inputs.map((row) => [and(row), ...row]);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export default class Helper {
);
}

return parseInt(number, 10)
.toString(2)
.padStart(propositions, '0');
const binary = parseInt(number, 10).toString(2);

return binary.padStart(propositions, '0');
}

static totalTrueInputs(row) {
Expand Down
4 changes: 2 additions & 2 deletions src/NandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => nand(row));
this.result = this.inputs.map(row => [nand(row), ...row]);
this.output = this.inputs.map((row) => nand(row));
this.result = this.inputs.map((row) => [nand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/NorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => nor(row));
this.result = this.inputs.map(row => [nor(row), ...row]);
this.output = this.inputs.map((row) => nor(row));
this.result = this.inputs.map((row) => [nor(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/NotTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class NotTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => not(row));
this.result = this.inputs.map(row => [not(row), ...row]);
this.output = this.inputs.map((row) => not(row));
this.result = this.inputs.map((row) => [not(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/OrTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class OrTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => or(row));
this.result = this.inputs.map(row => [or(row), ...row]);
this.output = this.inputs.map((row) => or(row));
this.result = this.inputs.map((row) => [or(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xand(row));
this.result = this.inputs.map(row => [xand(row), ...row]);
this.output = this.inputs.map((row) => xand(row));
this.result = this.inputs.map((row) => [xand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XnandTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XnandTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xnand(row));
this.result = this.inputs.map(row => [xnand(row), ...row]);
this.output = this.inputs.map((row) => xnand(row));
this.result = this.inputs.map((row) => [xnand(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XnorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XnorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xnor(row));
this.result = this.inputs.map(row => [xnor(row), ...row]);
this.output = this.inputs.map((row) => xnor(row));
this.result = this.inputs.map((row) => [xnor(row), ...row]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/XorTruthTable.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import TruthTable from './BaseTruthTable.mjs';

class XorTruthTable extends TruthTable {
generateOutput() {
this.output = this.inputs.map(row => xor(row));
this.result = this.inputs.map(row => [xor(row), ...row]);
this.output = this.inputs.map((row) => xor(row));
this.result = this.inputs.map((row) => [xor(row), ...row]);
}
}

Expand Down

0 comments on commit a755c6d

Please sign in to comment.