Socket
Book a DemoInstallSign in
Socket

shuttl-ui-sdk

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shuttl-ui-sdk

Shuttl's frontend typescript utils and other common case stuff.

0.0.2-1.exp.3
latest
Source
npmnpm
Version published
Weekly downloads
24
Maintainers
4
Weekly downloads
 
Created
Source

Shuttl UI SDK

Shuttl's common use UI utilities, types, constants, etc.

NPM JavaScript Style Guide

Install

yarn add shuttl-ui-sdk

Note:

Multiple dependencies listed below are optional, and may need to be installed separately depending on the module you're using.

If you're using the Unified imports approach, they all must be installed separately, depending on whether your build system supports tree-shaking.

List of possibly required dependencies:

  • react
  • react-dom
  • prop-types
  • axios
  • @material-ui/utils
  • @material-ui/styles
  • @material-ui/core
  • @material-ui/icons

Usage

Path imports (JS and TS)

import { setSentryScope, initSentry, identifyUserOnLogRocket } from 'shuttl-ui-sdk/dist/utils/frontend-tracking';
import { getUrlParts } from 'shuttl-ui-sdk/dist/utils/dom';
import { REQUEST_STATE } from 'shuttl-ui-sdk/dist/globals/constants';

// ...

setSentryScope(...);
identifyUserOnLogRocket(...);

const { domain, subdomain, protocol } = getUrlParts('https://service-panel-frontend.shuttltech.com');
if (someRequestState === REQUEST_STATE.REQUEST) { ... }

Unified imports (JS only)

import { setSentryScope, initSentry, identifyUserOnLogRocket, getUrlParts, REQUEST_STATE } from 'shuttl-ui-sdk';

// ...

setSentryScope(...);
identifyUserOnLogRocket(...);

const { domain, subdomain, protocol } = getUrlParts('https://service-panel-frontend.shuttltech.com');
if (someRequestState === REQUEST_STATE.REQUEST) { ... }

FAQs

Package last updated on 08 Dec 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.