Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lendi/lendi-app-bridge

Package Overview
Dependencies
Maintainers
75
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lendi/lendi-app-bridge

Library to share state between micro frontends and lendi-app

  • 3.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
260
increased by266.2%
Maintainers
75
Weekly downloads
 
Created
Source

lendi-app-bridge

A library to bridge data between micro frontends and @lendi/lendi-app using localStorage

Api

class LendiAppBridge(prefix?: string, storage? = window.localStorage: Storage): LendiAppBridge

Returns an instance of a lendiAppBridge.

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

LendiAppBridge#getFunnelOneApiData(): FunnelOneApiData

Gets FunnelOneApiData from localStorage

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

const funnelOneData = bridge.getFunnelOneApiData();

LendiAppBridge#updateFunnelOneApiData(newData: FunnelOneApiData): void

Updates FunnelOneApiData in localStorage

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

const funnelOneData = bridge.getFunnelOneApiData();

const newFunnelOneData = { ...funnelOneData, security_value: 100 };

bridge.updateFunnelOneApiData(newFunnelOneData);

LendiAppBridge#clearFunnelOneData(): void

Clears any data for funnel-one in localStorage

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

bridge.clearFunnelOneData();

LendiAppBridge#getActiveApplicationSfId(): ActiveApplicationSfId | undefined

Gets ActiveApplicationSfId from localStorage or returns undefined if doesnt exist

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

const activeApplicationSfId = bridge.getActiveApplicationSfId();

LendiAppBridge#updateActiveApplicationSfId(newData: ActiveApplicationSfId): void

Updates ActiveApplicationSfId in localStorage

Example:

import LendiAppBridge from '@lendi/lendi-app-bridge';

const bridge = new LendiAppBridge();

bridge.updateActiveApplicationSfId('A-NEW-ID');

FAQs

Package last updated on 16 Aug 2022

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