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

@abtasty/widget-utils

Package Overview
Dependencies
Maintainers
26
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abtasty/widget-utils

Collection of useful functions for AB Tasty Widgets.

  • 1.18.31
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
513
increased by832.73%
Maintainers
26
Weekly downloads
 
Created
Source

Widgets Utils

Collection of useful functions for AB Tasty Widgets.

Installation

Inside your Widget folder, install the widget-utils library:

npm install @abtasty/widget-utils

Note: you can also use yarn instead of npm: yarn add @abtasty/widget-utils

Usage

With Webpack or Rollup.js:

import { waitForElement, isAffected } from '@abtasty/widget-utils'

const waitForBody = waitForElement('#section', section => {
    section.insertAdjacentHTML('beforeend', '<p>New paragraph at the end of that section.</p>');
});

setTimeout(() => {
    if (!isAffected()) {
        waitForBody.clear();
    }
}, 10000);

When you have installed and build your locally project :

  1. run in a terminal : npm link in your widget-utils folder
  2. in your widget local folder you want to test this project, run in a terminal : npm link @abtasty/widget-utils
  3. build your widget project, then build editor project.

First, install your widget-utils, copy the path of the project. Then, In your local widget project :

  • after a npm install, delete the folder /node_modules/@abtasty/widget-utils
  • with your terminal, navigate to the folder /node_modules/@abtasty/
  • run the bash command :
ln -s {your path to widget-utils project folder} widget-utils

A symlink has been created in your widget project, with the folder: /node_modules/@abtasty/widget-utils

FAQs

Package last updated on 20 Jul 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