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

@ephox/sugar

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ephox/sugar

Basic DOM manipulation

  • 9.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
decreased by-64.65%
Maintainers
2
Weekly downloads
 
Created
Source

Description

sugar is a library for manipulating and accessing the DOM. It does not bundle any commands. It is only a collection of modules.

Installation

sugar is available as an npm package. You can install it via the npm package @ephox/sugar

Install from npm

npm install @ephox/sugar

Usage

sugar is the base DOM library used in many projects. It has an API which is broken up into seven main packages. Do not use any modules directly that are not in an api package.

dom: mostly handles inserting, appending, and manipulating individual DOM nodes. events: handles DOM events and listeners node: handles different types of nodes such as comments, elements, and text nodes properties: handles reading, writing, and removing style properties, attributes, and values search: handles searching for DOM nodes based on selectors, predicates, and DOM position selection: handles browser ranges and selection tag: handles specialised HTML tags like option and select view: handles scrolling, visibility, and measurements

Running Tests

sugar uses bedrock to run tests. This is packaged as a dev dependency of sugar. To run the tests, use:

$ yarn test

Keywords

FAQs

Package last updated on 06 Feb 2024

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