How to use uuid-browser - 1 common examples

To help you get started, we’ve selected a few uuid-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github elsa-workflows / elsa-designer / src / components / workflow-designer / designer / designer.tsx View on Github external
async addActivity(activityDefinition: ActivityDefinition) {
    const left = !!this.lastClickedLocation ? this.lastClickedLocation.left : 150;
    const top = !!this.lastClickedLocation ? this.lastClickedLocation.top : 150;

    const activity: Activity = {
      id: uuid(),
      top: top,
      left: left,
      type: activityDefinition.type,
      state: {}
    };

    this.lastClickedLocation = null;

    const activities = [...this.workflow.activities, activity];
    this.workflow = { ...this.workflow, activities };
  }

uuid-browser

browser-part from the uuid-package

MIT
Latest version published 7 years ago

Package Health Score

52 / 100
Full package analysis

Popular uuid-browser functions

Similar packages