Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
bti-dom-utils
Advanced tools
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.
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
For quick documentation on each function, please see the inline comments in the source code. These comments are in JSDoc3 format, so you can also build them for a prettier experience.
jsdoc -c jsdoc.conf.json lib/dom-utils.js README.md
If you don't have JSDoc3 installed globally, run npm install -g jsdoc3
before running that command.
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.
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.
FAQs
A semi-random collection of useful DOM utilities.
We found that bti-dom-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.