Namibian Pyjama Merchant

    @lendi/lendi-app-bridge
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.0 • Public • Published

    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');

    Keywords

    none

    Install

    npm i @lendi/lendi-app-bridge

    DownloadsWeekly Downloads

    233

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    28.5 kB

    Total Files

    18

    Last publish

    Collaborators

    • trung-lendi
    • sadia-afrin
    • sean-elliott-lendi
    • nghiato
    • samanthaksanders
    • sunny.niu
    • pratyush-lendi
    • weikun-lendi
    • mfarshadmehr
    • ritapang
    • jayce_dugan
    • damien.lendi
    • jessezha
    • vinualwislendi
    • jannes.mingram.lendi
    • shraddham
    • bchiong
    • antoine_lendi
    • coshea
    • lendi-owner
    • willparker
    • mekaela
    • bradley.martin.lendi
    • kevin_bao_lendi
    • andy_sawyer
    • anuragsri
    • malkyfaith
    • brianduan
    • andrealin
    • yihan_lu_lendi
    • matthew-jordan
    • vamsiampolu
    • stan-lendi
    • amir.sarvestani
    • timsilva
    • illi4
    • samnevers
    • tues
    • jeffrey9231
    • boris.gordon
    • leo.wei
    • naguibihab
    • edkim_lendi
    • bharadwajsampath
    • joshatlendi
    • nodemacross
    • ddiprose_lendi
    • wilkinsleung0712
    • john.zhang
    • luissilvalendi
    • jacktator
    • lendi-luizglingani
    • nikste
    • cgreenlendi
    • simon.armstrong
    • allancrainlendi
    • thomaslendi
    • dimitrioslendi
    • daniel-deng-lendi
    • hemanthvenkata
    • ashis.nayak
    • kevinlilendi
    • tigerpistol
    • mapaxton
    • desmond.hsu
    • le-kang-lendi
    • yifan_lendi
    • yupeili
    • rwinarto.lendi
    • andrewantony
    • harshdeepgarg_lendi
    • dirgh
    • zhengyang.liu
    • mahmood-sajjadi
    • janettt