Gathering detailed insights and metrics for ktsrpc-browser
Gathering detailed insights and metrics for ktsrpc-browser
npm install ktsrpc-browser
Typescript
Module System
Node Version
NPM Version
71.9
Supply Chain
64.3
Quality
77.6
Maintenance
100
Vulnerability
100
License
TypeScript (87.67%)
JavaScript (9.65%)
HTML (2.68%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
336
Last Day
2
Last Week
2
Last Month
8
Last Year
336
MIT License
10 Stars
167 Commits
8 Forks
2 Watchers
3 Branches
2 Contributors
Updated on Jan 08, 2025
Minified
Minified + Gzipped
Latest Version
3.4.18
Package Id
ktsrpc-browser@3.4.18
Unpacked Size
34.91 kB
Size
6.10 kB
File Count
8
NPM Version
8.19.4
Node Version
16.20.2
Published on
Jun 10, 2024
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
0%
2
Compared to previous week
Last Month
-60%
8
Compared to previous month
Last Year
0%
336
Compared to previous year
TSRPC is a TypeScript RPC framework with runtime type checking and binary serialization. See more detail at https://github.com/k8w/tsrpc.
Official site: https://tsrpc.cn
HttpClient
is using XMLHttpRequest
, and WebSocketClient
is using WebSocket
of browser.
Platform adapted to XMLHttpRequest
and WebSocket
(like ReactNative
) can also use this library.
1import { HttpClient } from 'tsrpc-browser'; 2import { serviceProto } from './shared/protocols/serviceProto'; 3 4// Create the Client 5let client = new HttpClient(serviceProto, { 6 server: 'http://127.0.0.1:3000', 7 logger: console 8}); 9 10async function yourFunc() { 11 // Call API 12 let ret = await client.callApi('Hello', { 13 name: 'World' 14 }); 15 16 // Error: ret.err is TsrpcError 17 if (!ret.isSucc) { 18 alert('Error: ' + ret.err.message); 19 return; 20 } 21 22 // Success: ret.res is ResHello 23 alert('Success: ' + ret.res.reply); 24}
The library is compiled to target ES2015
, so if you need legacy browser support, you can use Babel to transform the final code to ES5
. After that it can support all these browser:
Caution
es6-promise
polyfill by yourself.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More