Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@nextlua/khaos.js
Advanced tools
Javascript SDK for Khaos.
npm install --save khaosjs
or yarn add khaosjs
import Khaos from "khaosjs";
Khaos.init({
apiKey: "your-api-key",
networkOptions: {
baseApiUrl: "https://api.yourapp.com",
bodyKeysToRecord: ["isSucceed", "data", "message"],
headerKeysToRecord: [],
headersToRedact: [],
urlBlocklist: [],
tracingOrigins: [],
},
showButton: true,
appInfo: {},
});
<script>
tag<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
This is an example of a vanilla JS app.
<script src="dist/index.js"></script>
<script>
Khaos.default.init({
apiKey: "your-api-key",
networkOptions: {
baseApiUrl: "https://api.yourapp.com",
bodyKeysToRecord: ["isSucceed", "data", "message"],
headerKeysToRecord: [],
headersToRedact: [],
urlBlocklist: [],
tracingOrigins: [],
},
showButton: true,
appInfo: {},
});
</script>
</body>
</html>
Khaos.init(options: KhaosInitOptions): void
options
apiKey
: string
: (Required) API key provided in Khaos Dashboard.appInfo
: KhaosAppInfo
(Optional)
buildVersion
: string
: (Optional)appVersion
: string
: (Optional)appVersionBuild
: string
: (Optional)appName
: string
: (Optional)appNameId
: string
: (Optional)appLanguage
: string
: (Optional)bundleId
: string
: (Optional)networkOptions
: KhaosNetworkOptions
: (Optional) options for network monitoring.
baseApiUrl
: string
: (Required) Your project's base Back-end API URL. Network monitoring won't work unless it is present.bodyKeysToRecord
: string[]
: (Optional) Overrides bodyKeysToRedact
List of HTTP Body keys to be recorded. Other keys will be redacted for security.bodyKeysToRedact
: string[]
: (Optional) List of HTTP Body keys to be redacted for security (for hiding keys that contain secret keys/tokens).headerKeysToRecord
: string[]
: (Optional) Overrides headersToRedact
, List of only HTTP Headers to be recorded.headersToRedact
: string[]
: (Optional) List of HTTP Header keys containing secret keys/tokens.urlBlocklist
: string[]
: (Optional) List of URL's that is unwanted to be monitored.tracingOrigins
: string[]
: (Optional) List of URL's to be monitored other than baseApiUrl
.showButton
: boolean
: (Optional, default: true
) show Khaos button for bug submit form.Khaos.showForm(): void
Shows bug request form.
Khaos.hideForm(): void
Hides bug request form.
Khaos.toggleForm(): void
Toggles bug request form.
FAQs
Javascript SDK for Khaos.
The npm package @nextlua/khaos.js receives a total of 0 weekly downloads. As such, @nextlua/khaos.js popularity was classified as not popular.
We found that @nextlua/khaos.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.