Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 4a4f807

Browse files
authored
Implement payid-utils (#8)
Actually write the PayID Utility library: Function to take an unknown input and return a PayId string Function to take an unknown input and return a PayIdUrl URL object Functions to convert between PayID <=> URL representations Function to split a PayId string into it's [user, host] tuple pair
1 parent 6818a9d commit 4a4f807

16 files changed

+561
-199
lines changed

.eslintrc.js

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
11
module.exports = {
2-
root: true,
2+
root: true,
33

4-
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
5-
parserOptions: {
6-
// Enable linting rules with type information from our tsconfig
7-
tsconfigRootDir: __dirname,
8-
project: ['./tsconfig.eslint.json'],
4+
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
5+
parserOptions: {
6+
// Enable linting rules with type information from our tsconfig
7+
tsconfigRootDir: __dirname,
8+
project: ['./tsconfig.eslint.json'],
99

10-
sourceType: 'module', // Allow the use of imports / ES modules
10+
sourceType: 'module', // Allow the use of imports / ES modules
1111

12-
ecmaFeatures: {
13-
impliedStrict: true, // Enable global strict mode
14-
},
12+
ecmaFeatures: {
13+
impliedStrict: true, // Enable global strict mode
1514
},
15+
},
1616

17-
// Specify global variables that are predefined
18-
env: {
19-
node: true, // Enable node global variables & Node.js scoping
20-
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
21-
},
17+
// Specify global variables that are predefined
18+
env: {
19+
node: true, // Enable node global variables & Node.js scoping
20+
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
21+
},
2222

23-
plugins: [],
24-
extends: ['@xpring-eng/eslint-config-base'],
23+
plugins: [],
24+
extends: [
25+
'@xpring-eng/eslint-config-mocha',
26+
'@xpring-eng/eslint-config-base',
27+
],
2528

26-
rules: {},
27-
overrides: [],
29+
rules: {},
30+
overrides: [],
2831
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# `@payid-org/payid-utils`
1+
# `@payid-org/utils`
22

3-
![NPM version badge](https://img.shields.io/npm/v/@payid-org/payid-utils)
3+
![NPM version badge](https://img.shields.io/npm/v/@payid-org/utils)
44

55
A TypeScript library providing PayID utility functions.
66

package-lock.json

Lines changed: 71 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "@payid-org/payid-utils",
2+
"name": "@payid-org/utils",
33
"version": "0.1.0",
44
"description": "A TypeScript library providing PayID utility functions",
5-
"homepage": "https://github.com/payid-org/payid-utils#readme",
5+
"homepage": "https://github.com/payid-org/utils#readme",
66
"bugs": {
7-
"url": "https://github.com/payid-org/payid-utils/issues"
7+
"url": "https://github.com/payid-org/utils/issues"
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/payid-org/payid-utils.git"
11+
"url": "git+https://github.com/payid-org/utils.git"
1212
},
1313
"license": "Apache-2.0",
1414
"author": "",
@@ -29,15 +29,16 @@
2929
"@types/chai": "^4.2.11",
3030
"@types/mocha": "^7.0.2",
3131
"@types/node": "^14.0.14",
32-
"@typescript-eslint/eslint-plugin": "^3.5.0",
33-
"@typescript-eslint/parser": "^3.5.0",
34-
"@xpring-eng/eslint-config-base": "^0.9.0",
32+
"@typescript-eslint/eslint-plugin": "^3.7.1",
33+
"@typescript-eslint/parser": "^3.7.1",
34+
"@xpring-eng/eslint-config-base": "^0.11.0",
35+
"@xpring-eng/eslint-config-mocha": "^1.0.0",
3536
"chai": "^4.2.0",
36-
"eslint": "^7.3.1",
37+
"eslint": "^7.5.0",
3738
"eslint-plugin-array-func": "^3.1.6",
3839
"eslint-plugin-eslint-comments": "^3.2.0",
3940
"eslint-plugin-import": "^2.22.0",
40-
"eslint-plugin-jsdoc": "^28.5.1",
41+
"eslint-plugin-jsdoc": "^30.0.3",
4142
"eslint-plugin-mocha": "^7.0.1",
4243
"eslint-plugin-node": "^11.1.0",
4344
"eslint-plugin-prettier": "^3.1.4",

0 commit comments

Comments
 (0)