Welcome! to my wonderful JS libary, lets stop my yappin, and start my code?...
If your wondering how to use this awesome libary! You have a few methods but one:
<script src="https://cdn.jsdelivr.net/gh/Null-Austin/BestJS/Best.JS"></script>
- Returns the first element that matches the specified
selector
. - Example:
Best.query('#myId')
- Appends
eletoappend
toeletoappendto
. - Example:
Best.appChild(document.body, document.createElement('div'))
- Adds the specified
classname
to theelement
. - Example:
Best.addclass(document.body, 'my-class')
- Removes the specified
classname
from theelement
. - Example:
Best.removeclass(document.body, 'my-class')
- Creates a new element of type
type
with the specifiedhtml
content andstylecode
styles. - Example:
Best.ce('div', 'Hello World!', 'color: red;')
- Logs the specified
message
to the console. - Example:
Best.clog('Hello World!')
- Tests the BestJS library by displaying an alert box with the library version.
- Example:
Best.testbestjs()
- Creates a new iframe element with the specified
url
as its source. - Example:
Best.iframeC('https://example.com')
- Generates a random string of the specified
length
. - Example:
Best.randomstr(10)
- Generates a random integer between
min
andmax
. - If
rounded
istrue
, the result is rounded to the nearest integer. - Example:
Best.randomint(1, 10, true)
- Returns the current date in the format
mm-dd-yyyy
. - Example:
Best.getdate()
BestJS can be accessed using the following aliases:
b
B
best
BestJS