Skip to content

Commit 245332e

Browse files
committed
refactor: remove unused helper
1 parent e8943dc commit 245332e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/main.js

-11
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ const MiniJS = (() => {
9696
_initializeGlobalVariables()
9797
_addMethodsToVariables()
9898
_applyBindings()
99-
_addHelpers()
10099
updateStates()
101100
_listenToDOMChanges()
102101
// Temporarily commented out - to be reviewed
@@ -106,16 +105,6 @@ const MiniJS = (() => {
106105
console.log(`MiniJS took ${executionTime}ms to run.`)
107106
}
108107

109-
function _addHelpers() {
110-
// Add times method to numbers
111-
// 5.times will return [undefined, undefined, undefined, undefined, undefined]
112-
Object.defineProperty(Number.prototype, 'times', {
113-
get: function () {
114-
return Array.from({ length: this })
115-
},
116-
})
117-
}
118-
119108
function _listenToDOMChanges() {
120109
observeDOM(document.body, (mutation) => {
121110
mutation.forEach((record) => {

0 commit comments

Comments
 (0)