massbank 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +27 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/isValid.d.ts +12 -0
- package/lib/isValid.d.ts.map +1 -0
- package/lib/isValid.js +15 -0
- package/lib/isValid.js.map +1 -0
- package/package.json +49 -0
- package/src/index.ts +7 -0
- package/src/isValid.ts +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 cheminfo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# massbank
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/massbank)
|
|
4
|
+
[](https://www.npmjs.com/package/massbank)
|
|
5
|
+
[](https://codecov.io/gh/cheminfo/massbank)
|
|
6
|
+
[](https://github.com/cheminfo/massbank/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Utilities to submit massbank data.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```console
|
|
13
|
+
npm install massbank
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import { myModule } from 'massbank';
|
|
20
|
+
|
|
21
|
+
const result = myModule(args);
|
|
22
|
+
// result is ...
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
[MIT](./LICENSE)
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CAEjC"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/lib/isValid.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FifoLogger } from 'fifo-logger';
|
|
2
|
+
export interface IsValidOptions {
|
|
3
|
+
logger?: FifoLogger;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Check if massbank file is valid
|
|
7
|
+
* @param text
|
|
8
|
+
* @param options
|
|
9
|
+
* @returns A very important number
|
|
10
|
+
*/
|
|
11
|
+
export declare function isValid(text: string, options?: IsValidOptions): boolean;
|
|
12
|
+
//# sourceMappingURL=isValid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValid.d.ts","sourceRoot":"","sources":["../src/isValid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAS3E"}
|
package/lib/isValid.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if massbank file is valid
|
|
3
|
+
* @param text
|
|
4
|
+
* @param options
|
|
5
|
+
* @returns A very important number
|
|
6
|
+
*/
|
|
7
|
+
export function isValid(text, options = {}) {
|
|
8
|
+
const { logger } = options;
|
|
9
|
+
console.log(logger);
|
|
10
|
+
if (logger) {
|
|
11
|
+
logger.info('you forget a abc');
|
|
12
|
+
}
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=isValid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isValid.js","sourceRoot":"","sources":["../src/isValid.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,UAA0B,EAAE;IAChE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAE3B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "massbank",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Utilities to submit massbank data",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "Luc Patiny",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./lib/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"lib",
|
|
14
|
+
"src"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"check-types": "tsc --noEmit",
|
|
18
|
+
"clean": "rimraf coverage lib",
|
|
19
|
+
"eslint": "eslint .",
|
|
20
|
+
"eslint-fix": "eslint . --fix",
|
|
21
|
+
"prepack": "npm run tsc",
|
|
22
|
+
"prettier": "prettier --check .",
|
|
23
|
+
"prettier-write": "prettier --write .",
|
|
24
|
+
"test": "npm run test-only && npm run check-types && npm run eslint && npm run prettier",
|
|
25
|
+
"test-only": "vitest run --coverage",
|
|
26
|
+
"tsc": "npm run clean && npm run tsc-build",
|
|
27
|
+
"tsc-build": "tsc --project tsconfig.build.json"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^24.10.0",
|
|
31
|
+
"@vitest/coverage-v8": "^4.0.7",
|
|
32
|
+
"@zakodium/tsconfig": "^1.0.2",
|
|
33
|
+
"eslint": "^9.39.1",
|
|
34
|
+
"eslint-config-cheminfo-typescript": "^20.0.0",
|
|
35
|
+
"fifo-logger": "^2.0.1",
|
|
36
|
+
"prettier": "^3.6.2",
|
|
37
|
+
"rimraf": "^6.1.0",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vitest": "^4.0.7"
|
|
40
|
+
},
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/cheminfo/massbank.git"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/cheminfo/massbank/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/cheminfo/massbank#readme"
|
|
49
|
+
}
|
package/src/index.ts
ADDED
package/src/isValid.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FifoLogger } from 'fifo-logger';
|
|
2
|
+
|
|
3
|
+
export interface IsValidOptions {
|
|
4
|
+
logger?: FifoLogger;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Check if massbank file is valid
|
|
9
|
+
* @param text
|
|
10
|
+
* @param options
|
|
11
|
+
* @returns A very important number
|
|
12
|
+
*/
|
|
13
|
+
export function isValid(text: string, options: IsValidOptions = {}): boolean {
|
|
14
|
+
const { logger } = options;
|
|
15
|
+
|
|
16
|
+
console.log(logger);
|
|
17
|
+
if (logger) {
|
|
18
|
+
logger.info('you forget a abc');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return true;
|
|
22
|
+
}
|