rf-touchstone 0.0.0 → 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/coverage/coverage-badge.svg +4 -4
- package/dist/Touchstone.cjs.js +7 -13
- package/dist/Touchstone.es.js +3561 -3429
- package/dist/Touchstone.umd.js +7 -13
- package/dist/frequency.d.ts +394 -0
- package/dist/index.d.ts +24 -0
- package/dist/touchstone.d.ts +367 -697
- package/package.json +40 -35
- package/readme.md +19 -5
- package/src/frequency.ts +693 -0
- package/src/index.ts +33 -0
- package/src/touchstone.ts +774 -0
- package/development.md +0 -181
- /package/{LICENSE → LICENSE.md} +0 -0
package/package.json
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rf-touchstone",
|
|
3
|
-
"private": false,
|
|
4
3
|
"type": "module",
|
|
5
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
6
5
|
"description": "A Javascript/TypeScript library for reading, manipulating, and writing Touchstone files (.snp files) used in radio frequency (RF) and microwave engineering.",
|
|
7
6
|
"main": "dist/Touchstone.cjs.js",
|
|
8
7
|
"module": "dist/Touchstone.es.js",
|
|
9
|
-
"types": "dist/
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
10
9
|
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"LICENSE",
|
|
15
|
-
"coverage/coverage-badge.svg"
|
|
10
|
+
"./dist",
|
|
11
|
+
"./src",
|
|
12
|
+
"./readme.md",
|
|
13
|
+
"./LICENSE.md",
|
|
14
|
+
"./coverage/coverage-badge.svg"
|
|
16
15
|
],
|
|
17
16
|
"license": "MIT",
|
|
18
17
|
"author": "https://github.com/panz2018",
|
|
19
|
-
"repository":
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/panz2018/RF-Touchstone.git"
|
|
21
|
+
},
|
|
20
22
|
"keywords": [
|
|
21
23
|
"rf",
|
|
22
24
|
"touchstone",
|
|
@@ -29,12 +31,15 @@
|
|
|
29
31
|
"s6p",
|
|
30
32
|
"frequency",
|
|
31
33
|
"scattering",
|
|
32
|
-
"matrix"
|
|
34
|
+
"matrix",
|
|
35
|
+
"impedance"
|
|
33
36
|
],
|
|
37
|
+
"packageManager": "yarn@4.12.0",
|
|
34
38
|
"scripts": {
|
|
35
|
-
"test": "run-p --print-label lint format test:unit test:coverage build
|
|
39
|
+
"test": "run-p --print-label lint format test:unit test:coverage build && run-s docs:md docs:build",
|
|
36
40
|
"lint": "eslint . --fix",
|
|
37
|
-
"format": "prettier --write
|
|
41
|
+
"format": "prettier --write .",
|
|
42
|
+
"test:watch": "vitest",
|
|
38
43
|
"test:unit": "vitest run",
|
|
39
44
|
"test:coverage": "vitest run --coverage && coverage-badges --source coverage/coverage-summary.json --output coverage/coverage-badge.svg",
|
|
40
45
|
"build": "tsc && vite build && yarn pack",
|
|
@@ -44,30 +49,30 @@
|
|
|
44
49
|
"docs:preview": "vitepress preview docs"
|
|
45
50
|
},
|
|
46
51
|
"dependencies": {
|
|
47
|
-
"mathjs": "
|
|
52
|
+
"mathjs": "15.1.0"
|
|
48
53
|
},
|
|
49
54
|
"devDependencies": {
|
|
50
|
-
"@eslint/js": "
|
|
51
|
-
"@types/eslint-config-prettier": "
|
|
52
|
-
"@types/node": "
|
|
53
|
-
"@vitest/coverage-v8": "
|
|
54
|
-
"coverage-badges-cli": "
|
|
55
|
-
"eslint": "
|
|
56
|
-
"eslint-config-prettier": "
|
|
57
|
-
"eslint-plugin-prettier": "
|
|
58
|
-
"globals": "
|
|
59
|
-
"happy-dom": "
|
|
60
|
-
"markdown-it-mathjax3": "
|
|
61
|
-
"npm-run-all": "
|
|
62
|
-
"prettier": "
|
|
63
|
-
"rollup-plugin-visualizer": "
|
|
64
|
-
"typedoc": "
|
|
65
|
-
"typedoc-plugin-markdown": "
|
|
66
|
-
"typescript": "
|
|
67
|
-
"typescript-eslint": "
|
|
68
|
-
"vite": "
|
|
69
|
-
"vite-plugin-dts": "
|
|
70
|
-
"vitepress": "
|
|
71
|
-
"vitest": "
|
|
55
|
+
"@eslint/js": "9.39.2",
|
|
56
|
+
"@types/eslint-config-prettier": "6.11.3",
|
|
57
|
+
"@types/node": "25.0.3",
|
|
58
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
59
|
+
"coverage-badges-cli": "2.2.0",
|
|
60
|
+
"eslint": "9.39.2",
|
|
61
|
+
"eslint-config-prettier": "10.1.8",
|
|
62
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
63
|
+
"globals": "16.5.0",
|
|
64
|
+
"happy-dom": "20.0.11",
|
|
65
|
+
"markdown-it-mathjax3": "5.2.0",
|
|
66
|
+
"npm-run-all": "4.1.5",
|
|
67
|
+
"prettier": "3.7.4",
|
|
68
|
+
"rollup-plugin-visualizer": "6.0.5",
|
|
69
|
+
"typedoc": "0.28.15",
|
|
70
|
+
"typedoc-plugin-markdown": "4.9.0",
|
|
71
|
+
"typescript": "5.9.3",
|
|
72
|
+
"typescript-eslint": "8.50.1",
|
|
73
|
+
"vite": "7.3.0",
|
|
74
|
+
"vite-plugin-dts": "4.5.4",
|
|
75
|
+
"vitepress": "1.6.4",
|
|
76
|
+
"vitest": "4.0.16"
|
|
72
77
|
}
|
|
73
78
|
}
|
package/readme.md
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
A Javascript/TypeScript library for reading, manipulating, and writing Touchstone files (.snp files) used in radio frequency (RF) and microwave engineering.
|
|
4
4
|
|
|
5
|
-
[](https://github.com/panz2018/RF-Touchstone/actions/workflows/test.yml)
|
|
6
6
|
[](coverage/coverage-badge.svg)
|
|
7
7
|
|
|
8
|
+
<!--
|
|
9
|
+
[](https://github.com/mjcaprani/rf-touchstone/actions/workflows/test-react-example.yml)
|
|
10
|
+
-->
|
|
11
|
+
|
|
8
12
|
## Overview
|
|
9
13
|
|
|
10
14
|
RF-Touchstone provides a complete solution for working with S-parameters and other network parameters in JavaScript/TypeScript environments. This library allows you to:
|
|
@@ -31,6 +35,7 @@ RF-Touchstone currently supports versions 1.0 and 1.1 of the Touchstone specific
|
|
|
31
35
|
- Format conversions: RI (Real/Imaginary), MA (Magnitude/Angle), DB (Decibel/Angle)
|
|
32
36
|
- TypeScript implementation with strong typing
|
|
33
37
|
- Comprehensive test suite
|
|
38
|
+
- Published on NPM: [rf-touchstone](https://www.npmjs.com/package/rf-touchstone)
|
|
34
39
|
|
|
35
40
|
## Installation
|
|
36
41
|
|
|
@@ -47,22 +52,31 @@ import { Touchstone } from 'rf-touchstone'
|
|
|
47
52
|
|
|
48
53
|
// Read a Touchstone file
|
|
49
54
|
const touchstone = new Touchstone()
|
|
50
|
-
touchstone.readContent(fileContent, 2) // 2-port network
|
|
55
|
+
touchstone.readContent(fileContent, 2) // assuming a 2-port network
|
|
51
56
|
|
|
52
57
|
// Access data
|
|
53
|
-
const frequencies = touchstone.
|
|
54
|
-
const sParameters = touchstone.
|
|
58
|
+
const frequencies = touchstone.frequency.f_scaled
|
|
59
|
+
const sParameters = touchstone.matrix
|
|
55
60
|
|
|
56
61
|
// Write back to Touchstone format
|
|
57
62
|
const newContent = touchstone.writeContent()
|
|
58
63
|
```
|
|
59
64
|
|
|
65
|
+
<!--
|
|
66
|
+
## Examples
|
|
67
|
+
|
|
68
|
+
This repository includes examples to demonstrate the usage of `rf-touchstone` in different contexts.
|
|
69
|
+
|
|
70
|
+
- **[React Example](https://github.com/panz2018/RF-Touchstone/tree/main/examples/react)**: A simple standalone React application (using Vite and TypeScript) that showcases how to import and use `rf-touchstone` from npm to parse and display Touchstone file data. Includes comprehensive tests and a GitHub Action for CI.
|
|
71
|
+
-->
|
|
72
|
+
|
|
60
73
|
## Documentation
|
|
61
74
|
|
|
62
75
|
For detailed documentation, please visit:
|
|
63
76
|
|
|
64
77
|
- [Project Website](https://panz2018.github.io/RF-Touchstone/)
|
|
65
78
|
- [DeepWiki Documentation](https://deepwiki.com/panz2018/RF-Touchstone) - Interactive AI documentation that allows you to converse and ask questions about this repository
|
|
79
|
+
- [Changelog](https://github.com/panz2018/RF-Touchstone/releases)
|
|
66
80
|
|
|
67
81
|
## Development
|
|
68
82
|
|
|
@@ -70,4 +84,4 @@ For information on setting up a development environment and contributing to the
|
|
|
70
84
|
|
|
71
85
|
## License
|
|
72
86
|
|
|
73
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
87
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) file for details.
|