Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions EasyMod.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* This is EasyMod.js
By BonesYT (start: 19:48 03/01/2022 DD/MM/YYYY)
(release: 11:58 04/01/2022 DD/MM/YYYY)
(update: 11:28 02/02/2022 DD/MM/YYYY) <-- edit this as well when modding
Last modded by: (no one)
(update: 17:04 04/02/2022 DD/MM/YYYY) <-- edit this as well when modding
Last modded by: BinaryCrown
EasyMod.js basically adds functions to strings, numbers, etc.
Please don't copy!

Expand All @@ -27,7 +27,7 @@ var EasyObj = {
modders: [ // All people that modified/forked this
"BinaryCrown"
],
lastBy: "BonesYT", // Last edited by
lastBy: "BinaryCrown", // Last edited by
a: { // All adds
proto: {}, // Added prototype functions lists
static: {}, // Added static values lists
Expand All @@ -47,34 +47,39 @@ var EasyObj = {
isDefined: (n)=>{
return this[n] !== undefined
},
ifnDef: (n,e,p)=>{
if (this[n] === undefined) {return null;}
e(...p);
},
get: (n)=>{
return this[n]
},
switchGet: (n,v,e,p)=>{
for (let j = 0; j < v.length; j++) {
if (this[n] === v[j]) {e(...p[j])}
}
},
createMethod: (target, name, func)=>{ //f(Number, 'test', ()=>{//code here})
var a = target
if (typeof a != 'function') a = this[target]
let a = (typeof target !== 'function') ? this[target] : target
a.prototype[name] = func
},
isConst(varname) { //
var zzzz
isConst(varname) {
try {
eval(varname.toString())
try {
eval(`zzzz = ${varname}`)
eval(`${varname} = 'Replaced'`)
eval(`${varname} = zzzz`)
return false
eval(`${varname} = _`)
} catch {
return true
}
return false
} catch {
throw ReferenceError('[EasyMod.js] 0: ' + varname + ' is not defined')
}
},
protoOf: (type)=>{
this[type].prototype
},
waitUntil(u=()=>{}, f=()=>{}, delay=10) { //wait until u returns true then run f.
waitUntil(u=()=>{}, f=()=>{}, delay=10) { // wait until u returns true then run f.
var a = 0, i,
b = ()=>{
if (u(a)) {
Expand Down Expand Up @@ -2707,4 +2712,4 @@ delete config // not really necessary lol
Object.prototype.type = 'object'
Symbol.prototype.type = 'symbol'

})() // 70.4% from 2k to 3k! (if modding update this lol)
})() // 70.4% from 2k to 3k! (if modding update this lol)
Loading