Skip to content

Commit

Permalink
chore: readme fixes and deps bump (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmstss authored Mar 23, 2021
1 parent 741fa23 commit a797c20
Show file tree
Hide file tree
Showing 4 changed files with 1,804 additions and 2,288 deletions.
10 changes: 2 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -22,6 +21,7 @@
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
Expand Down Expand Up @@ -215,12 +215,6 @@
"no-multiple-empty-lines": "error",
"no-new-wrappers": "error",
"no-restricted-syntax": ["error", "ForInStatement"],
"no-shadow": [
"error",
{
"hoist": "all"
}
],
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Return un-abbreviated metric value: e.g. 'Network' for input ('AV', 'N')
<summary>ECMAScript 2015, Typescript modules</summary>

```
import { calculateBaseScore } from 'cvss';
import { calculateBaseScore } from '@neuralegion/cvss';
console.log('score: ', calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'));
```
Expand All @@ -96,7 +96,7 @@ console.log('score: ', calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/
<summary>NodeJS (CommonJS module)</summary>

```
const cvss = require('cvss');
const cvss = require('@neuralegion/cvss');
console.log(cvss.calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'));
```
Expand All @@ -109,7 +109,7 @@ console.log(cvss.calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:
`usage.mjs` file:

```
import cvss from 'cvss';
import cvss from '@neuralegion/cvss';
console.log(cvss.calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'));
```
Expand All @@ -122,7 +122,7 @@ Running: `node --experimental-modules ./usage.mjs`
<summary>Browser (globals from umd bundle)</summary>

```
<script src="./node_modules/cvss/dist/bundle.umd.js"></script>
<script src="./node_modules/@neuralegion/cvss/dist/bundle.umd.js"></script>
<script>
alert(`Score: ${cvss.calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N')}`);
</script>
Expand All @@ -134,7 +134,7 @@ Running: `node --experimental-modules ./usage.mjs`

```
<script type="module">
import { calculateBaseScore } from './node_modules/cvss/dist/bundle.es.js';
import { calculateBaseScore } from './node_modules/@neuralegion/cvss/dist/bundle.es.js';
alert(`Score: ${calculateBaseScore('CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N')}`);
</script>
```
Expand Down
Loading

0 comments on commit a797c20

Please sign in to comment.