flash-assistant
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-beta.4 • Public • Published

Hackaton ASSISTANT

Assistant HACKATON ASSISTANT

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/flash-assistant@^0.1.0-beta.0/build/widget.js';, function () {
  var assistant = window.Assistant({
    //you can set the config initial
    user_id: '123',
    product: 'GOOGLE'
  });
 
  // Or later
  var assistant = window.Assistant();
  assistant.setConfig({  user_id : '123', product: 'GOOGLE' });
});

Via npm

// Assistant.ts <~ create in your application
import Assistant from 'flash-assistant';
 
export async function setConfig(yourConfig: IYourInterface) {
  const promiseAssistant = Assistant();
  const assistant = await promiseAssistant;
  if (!assistant) return;
 
  assistant.setConfig(yourConfig);
}
 

Readme

Keywords

none

Package Sidebar

Install

npm i flash-assistant

Weekly Downloads

0

Version

0.1.0-beta.4

License

none

Unpacked Size

5.94 MB

Total Files

60

Last publish

Collaborators

  • jonathasprodrigues