id-better
v1.0.2
Published
The id package, but better
Readme
id-better
The id package, but better
Installing
To install id-better. Run the following on your console:
npm i id-better
# or...
pnpm i id-betterInitializing
Initializing is as simple as 2 lines of code!
import { Get } from "id-better"
let get = new Get(document)USAGE
There are three different ways to get a element.
By ID
To get a HTML element by id, you must put this:
get.byId("test-id")By Class
To get a HTML element by class, you must put this:
get.byClass("test-class")
// or...
get.byClass("multi-test-class", 5)By Tag
To get a HTML element by tag, you must put this:
get.byTag("div")
// or...
get.byTag("p", 2)BROWSER
You can put it on YOUR website as you would on server side, since the majority is on ECMAScript and not on CommonJS.
But what if i wanna use CommonJS?
You should use browserify if you want to.
