New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@heycharles/browser-sdk

Package Overview
Dependencies
Maintainers
0
Versions
663
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heycharles/browser-sdk

The Browser SDK for the Charles APIs.

  • 4.231.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
983
increased by564.19%
Maintainers
0
Weekly downloads
 
Created
Source

Charles Browser SDK

The browser utility for working with the Charles API.

Usage

# Run npm install and write your library name when asked. That's all!
npm install @heycharles/browser-sdk

Features

Importing Library

You can import the generated bundle to use the whole library generated by this starter:

import * as charles from '@heycharles/browser-sdk'

// configure which API to use. E.g. you can also run staging and sandbox APIs
charles.init({
  universe: 'https://my-universe.hello-charles.com'
})

// use any authentication method that .auth provides
charles.auth.loginUsername({ username: 'client_account@client.com', password: 'xxxxxxxxxxx' })

// or when already authenticated and rehydrating state you can immediately also hydrated an
// authenticated th client
charles.init({
  universe: 'https://my-universe.hello-charles.com',
  credentials: {
    token: window.localStorage.getItem('charles-token')
  },
  user: window.localStorage.getItem('charles-user-uuid')
})

Additionally, you can import the transpiled modules from dist/lib in case you have a modular library:

import Auth from '@heycharles/browser-sdk/dist/lib/Auth'

Development

  • npm t: Runs test suite.
  • npm start: Run npm run build in watch mode
  • npm run test:watch: Run test suite in interactive watch mode
  • npm run test:prod: Run linting and generate coverage
  • npm run build: Generate bundles and typings, create docs
  • npm run lint: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)

LICENSE

Apache-2.0

FAQs

Package last updated on 13 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc