Gathering detailed insights and metrics for stackbin-browser-client
Gathering detailed insights and metrics for stackbin-browser-client
Gathering detailed insights and metrics for stackbin-browser-client
Gathering detailed insights and metrics for stackbin-browser-client
This is the browser based error reporting client for Stackbin
npm install stackbin-browser-client
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11 Commits
1 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Jan 28, 2023
Latest Version
1.0.8
Package Id
stackbin-browser-client@1.0.8
Size
24.39 kB
NPM Version
3.8.5
Node Version
5.10.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
52
JavaScript error and exception tracking for modern web applications
This is the browser based error reporting client for Stackbin.
You will need access to a Stackbin account and project.
We're still in closed beta. Feel free to ask if you want to try!
1npm install stackbin-browser-client --save
There are 2 choices for integration, depending on your application and development environment.
HTML integration is the simplest and most common.
See the Node.js or Other languages may be better for you if you run multiple environments or have automated build processes.
Copy the contents of dist/snippet.min.js
into a script tag within the HEAD
of your HTML document.
In order to catch as many errors as possible, it should be the first script tag on the page.
Don't worry about performance, it all works asynchronously and will not affect page load times.
Example:
1<!DOCTYPE html> 2<html> 3<head> 4 <title>My Web App</title> 5 <script> 6 !function(S,T,A,C,K,B,I,N,_){ 7 //... minified garbage... 8 }(window,document,"script","https://stkbn.com/js","stackbin"); 9 </script> 10 <script src="https://..."></script> 11</head> 12<body>
Use this module to programmatically generate the snippet for inclusion within your template system.
1var stackbin = require('stackbin-browser-client');
Simplest usage:
1var snippet = stackbin.getSnippet('example-company/product-a-staging'); 2 3// Returns: 4// !function(S,T,A,C,K,B,I,N,_){ 5// ... minified garbage... 6// }(window,document,"script","https://stkbn.com/js","stackbin","example-company/product-a-staging");
More complex example with options.
1var options = { 2 config: {commit: process.env.NODE_ENV === 'production'}, 3 tag: {env: process.env.NODE_ENV, lang: config.get('lang')} 4} 5var snippet = stackbin.getSnippet('', options); 6 7// Returns: 8// !function(S,T,A,C,K,B,I,N,_){ 9// ... minified garbage... 10// }(window,document,"script","https://stkbn.com/js","stackbin"); 11// stackbin("id","example-company/product-a-staging"); 12// stackbin("config",{"commit": false}); 13// stackbin("tag",{"env":"development","lang":"en"});
From the example on the Express template engines page.
app.set('view engine', 'jade');
1html 2 head 3 title!= title 4 script!= snippet 5 body
1var snippet = stackbin.getSnippet(''); 2app.get('/', function (req, res) { 3 res.render('index', { title: 'Hey', snippet: snippet}); 4});
The browser client snippet is located at dist/snippet.min.js
.
You can include this in your template system by accessing the file directly.
Returns: string
Type: String
The property id for your Stackbin project. Can also be a blank string if you prefer to set the id via options.config
Example: example-company/product-a-staging
Type: Object
Type: Object
Options | Type | Default |
---|---|---|
id | String | |
commit | Boolean | true |
host | String | api.stkbn.com |
debug | Boolean | false |
Type: String
, Number
A unique identifier for your user.
Set this to a user id generated by your system to group and search for errors occurring repeatedly for a single user.
Type: Object
Default: {}
An object of arbitrary tags to store against the report.
Type: Boolean
Default: true
Whether you want to post exception reports to the Stackbin service.
Useful to set this to false in development to avoid using up your quota!
Type: Boolean
Default: true
Whether you want to post exception reports to the Stackbin service.
Useful to set this to false in development to avoid using up your quota!
Type: Boolean
Default: stackbin
The name of the global variable you will use to reference the Stackbin client.
Type: String
Default: https://stkbn.com/js
If you have been informed to use a different client URL. Specify it here.
Type: Object
Type: String
The absolute path to the client snippet.
Type: String
The absolute path to the collector library.
We're glad to help with anything, no matter how small!
See LICENCE file.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no SAST tool detected
Details
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
Score
Last Scanned on 2025-07-07
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