help-dom
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

help-dom

Small js package I use to help me deal with the dom

XO code style GitHub workflow status npm bundle size npm downloads

Install

$ npm install help-dom

Import

This package is pure ESM. It cannot be require()'d from CommonJS.

Use import foo from 'foo' instead of const foo = require('foo') to import the package.

// Load entire build
import * as helpDom from 'help-dom';

// Load by method
import {main} from 'help-dom';

If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).

You also need to make sure you're on the latest minor version of Node.js. At minimum Node.js 12.20, 14.14, or 16.0.

Read more here: sindresorhus/esm-package

Usage

main([1,2,3], (element) => typeof element === 'string');
//=> false

main(['1', '2', '3'], (element) => typeof element === 'string');
//=> true

allElements :

appendTo :

attsToString :

classPresentIf :

createElement :

createElementsArray :

getAttributes :

getBoundingClientRect :

getCookie :

getImageSizeByUrl :

getIndex :

getLocalStorage2 :

getOffset :

getOffsetParent :

getParentByData :

getParentById :

getPosition :

getPositionFromOffset :

getScroll :

getSessionStorage2 :

getUserLanguage :

getViewportPosition :

glb :

id :

insertAfter :

insertBefore :

isWebComponent :

makeStorageHelper :

nextChild :

objectifyForm :

offDOM :

onDOM :

onDOMMany :

prependTo :

removeElements :

serialize :

setCaretPosition :

setContent :

store :

tag :

toClipboard :

toClipboardFromElement :

windowLoaded :

License

MIT © Paul Nodet

Install

DownloadsWeekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

26.7 kB

Total Files

5

Last publish

Collaborators

  • pnodet