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

bti-dom-utils

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bti-dom-utils

A semi-random collection of useful DOM utilities.

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
2
Weekly downloads
 
Created
Source

DOM Utilities

This is a small collection of DOM utilities that are used frequently at Beneath the Ink. While some of the methods are similar to jQuery, this library is more focused on text in the DOM and extracting partial content from large documents.

Installation & Basic Usage

Download the latest version from the release page and use via a script tag. The variable DOMUtils will be attached to window.

<script type="text/javascript" src="dom-utils.js"></script>

If using Browserify, you can install via NPM and use with require("bti-dom-utils").

$ npm install bti-dom-utils

This library is just a plain object with several methods on it. Here is quick example of usage.

DOMUtils.contains(document, document.body); // true

Documentation

For quick documentation on each function, please see the inline comments in the source code. These comments are in Doxxo format, so you can also build them for a prettier experience.

npm run build-docs

How to Build from Scratch

The DOM utils uses Grunt to build a browserify bundle of the original source found in lib/. When the command below completes, the compiled source will be saved to dist/ directory.

npm install && grunt

If you don't the Grunt cli tools installed globally, run npm install -g grunt-cli before running that command.

Running the Unit Tests

While still in desperate need of more tests, there are a few Mocha-powered unit tests in the test/ directory. Running the tests is very simple. Make sure there is freshly built copy of the library in the dist/ folder and then open test/index.html in any browser.

Keywords

FAQs

Package last updated on 06 Apr 2015

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