Nauseating Pumpkin Mush

    @eduzz/nps
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.3 • Public • Published

    Eduzz NPS

    Nps EDUZZ NPS

    How to use

    In Browser

    (function (d, l, c) {
      var s = d.createElement('script');
      s.async = true;
      s.src = l;
      s.onload = c;
      d.body.append(s);
    })(document, 'https://unpkg.com/@eduzz/nps@^<version>/build/widget.js', function () {
      var nps = window.Nps({
        //you can set the config initial
        key_fields: { email: 'theflash@eduzz.com' }
        tag: { id: '123', email: 'theflash@eduzz.com', type: 'F' },
        endpoint: '<endpoint api>' //if ignored, set to production
      });
    
      // Or later
      var nps = window.Nps();
      nps.setConfig(
        { email: 'theflash@eduzz.com' }, 
        { id: '123', email: 'theflash@eduzz.com', type: 'F' },
        'modal',
        '<endpoint api>' // if ignored, set to production
      );

    Via npm

    // Nps.ts <~ create in your application
    import Nps from '@eduzz/nps';
    
    export async function setConfig(yourConfig: IYourInterface) {
      const promiseNps = Nps();
      const nps = await promiseNps;
      if (!nps) return;
    
      nps.setConfig(yourConfig);
    }

    Keywords

    none

    Install

    npm i @eduzz/nps

    DownloadsWeekly Downloads

    413

    Version

    1.2.3

    License

    none

    Unpacked Size

    582 kB

    Total Files

    6

    Last publish

    Collaborators

    • miguelaugl
    • saulo.castilhos
    • danieloprado
    • jonathasprodrigues
    • caferrari