Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/angelsolaorbaiceta/fe-fwk-book
/ functions
Functions
538 in github.com/angelsolaorbaiceta/fe-fwk-book
⨍
Functions
538
◇
Types & classes
74
↓ 749 callers
Function
h
(tag, props = {}, children = [])
packages/runtime/src/h.js:56
↓ 136 callers
Function
hFragment
(vNodes)
packages/runtime/src/h.js:124
↓ 77 callers
Function
defineComponent
({ render, state, onMounted = emptyFn, onUnmounted = emptyFn, ...methods })
packages/runtime/src/component.js:43
↓ 76 callers
Function
mountDOM
(vdom, parentEl, index, hostComponent = null)
packages/runtime/src/mount-dom.js:22
↓ 74 callers
Function
hString
(str)
packages/runtime/src/h.js:103
↓ 62 callers
Function
patch
(oldVdom, newVdom, hostComponent = null)
packages/runtime/src/__tests__/patch-dom.test.js:1195
↓ 43 callers
Function
defineComponent
({ render, state, onMounted = emptyFn, onUnmounted = emptyFn, ...methods })
listings/ch13/listing_02.js:1
↓ 41 callers
Method
mount
* Mounts the component into the parent HTML element and wires the event handlers. * Then calls the `onMounted()` lifecycle method and returns a p
packages/runtime/src/component.js:226
↓ 40 callers
Method
updateState
(state)
listings/ch09/listing_07.js:45
↓ 37 callers
Function
singleHtmlLine
(str)
packages/runtime/src/__tests__/utils.js:8
↓ 25 callers
Function
destroyDOM
(vdom)
packages/runtime/src/destroy-dom.js:14
↓ 25 callers
Function
emit
(eventName, payload)
listings/ch05/listing_07.js:9
↓ 25 callers
Method
navigateTo
* Navigates to the given route path, matching it to a component * and pushing it to the browser's history. * * When there isn't a "catch-all"
packages/runtime/src/router.js:267
↓ 23 callers
Method
updateState
* Updates all or part of the component's state and patches the DOM to reflect the changes. * * @param {Object.<string, Any>} state the new s
packages/runtime/src/component.js:182
↓ 21 callers
Function
setAttributes
(el, attrs)
packages/runtime/src/attributes.js:15
↓ 20 callers
Method
init
* Initializes the router by matching the current route to a component and * listening for the browser's popstate events. * * If there is no h
packages/runtime/src/router.js:222
↓ 19 callers
Function
arraysDiffSequence
( oldArray, newArray, equalsFn = (a, b) => a === b )
packages/runtime/src/utils/arrays.js:105
↓ 19 callers
Method
emit
(eventName, payload)
listings/ch11/listing_15.js:6
↓ 19 callers
Function
nextTick
()
packages/runtime/src/scheduler.js:53
↓ 18 callers
Function
areNodesEqual
(nodeOne, nodeTwo)
packages/runtime/src/nodes-equal.js:60
↓ 17 callers
Function
applyArraysDiffSequence
(oldArray, diffSeq)
packages/runtime/src/utils/arrays.js:150
↓ 17 callers
Function
patchDOM
(oldVdom, newVdom, parentEl, hostComponent = null)
packages/runtime/src/patch-dom.js:39
↓ 15 callers
Function
createApp
(RootComponent, props = {}, options = {})
packages/runtime/src/app.js:32
↓ 14 callers
Method
mount
(hostEl, index = null)
listings/ch09/listing_03.js:18
↓ 13 callers
Function
enqueueJob
(job)
packages/runtime/src/scheduler.js:12
↓ 13 callers
Function
h
(tag, props = {}, children = [])
listings/ch03/listing_02.js:12
↓ 13 callers
Function
hSlot
(children = [])
packages/runtime/src/h.js:196
↓ 13 callers
Method
subscribe
* Subscribes a handler function to the router's route change events. * The handler is called every time the route changes, and the handler is passe
packages/runtime/src/router.js:340
↓ 13 callers
Method
unmount
* Unmounts the component from the DOM and calls the `onUnmounted()` lifecycle method.
packages/runtime/src/component.js:258
↓ 11 callers
Function
arraysDiff
(oldArray, newArray)
packages/runtime/src/utils/arrays.js:38
↓ 11 callers
Function
assert
(condition, message = 'Assertion failed')
packages/runtime/src/utils/assert.js:1
↓ 11 callers
Function
handler
()
packages/runtime/src/__tests__/events.test.js:19
↓ 11 callers
Function
mountDOM
(vdom, parentEl/*--add--*/, index/*--add--*/)
listings/ch08/listing_02.js:1
↓ 10 callers
Method
dispatch
* Dispatches a command to all registered handlers and runs all * handlers registered to run after each command. * * Displays a warning if the
packages/runtime/src/dispatcher.js:63
↓ 10 callers
Function
extractPropsAndEvents
(vdom)
packages/runtime/src/utils/props.js:15
↓ 10 callers
Function
objectsDiff
(oldObj, newObj)
packages/runtime/src/utils/objects.js:26
↓ 10 callers
Function
validateRoute
(route)
packages/runtime/src/route-matchers.js:30
↓ 9 callers
Method
destroy
* Stops listening to the browser's popstate events. If the router is not * initialized, calling this method has no effect. * * Call this meth
packages/runtime/src/router.js:243
↓ 9 callers
Function
flushPromises
()
packages/runtime/src/utils/promises.js:1
↓ 8 callers
Function
destroyDOM
(vdom)
listings/ch04/listing_11.js:4
↓ 8 callers
Method
emit
* Emits an event to the parent component. * * @param {string} eventName The name of the event to emit * @param {Any} [payload] The payl
packages/runtime/src/component.js:278
↓ 8 callers
Method
updateProps
* Updates all or part of the component's props and patches the DOM to reflect the changes. * This method shouldn't be called from within the comp
packages/runtime/src/component.js:167
↓ 7 callers
Function
addEventListener
( eventName, handler, el, hostComponent = null )
packages/runtime/src/events.js:35
↓ 7 callers
Function
extractChildren
(vdom)
listings/ch08/listing_18.js:1
↓ 7 callers
Function
findIndexInParent
(parentEl, el)
listings/ch08/listing_07.js:15
↓ 7 callers
Function
removeAttribute
(el, name)
packages/runtime/src/attributes.js:59
↓ 6 callers
Function
allElementsHaveBeenDestroyed
(vdom)
packages/runtime/src/__tests__/destroy-dom.test.js:121
↓ 6 callers
Function
formatMoney
(amount)
examples/ch12/irpf/components/table.js:66
↓ 6 callers
Function
makeCountMap
(array)
packages/runtime/src/utils/maps.js:67
↓ 6 callers
Function
patchText
(oldVdom, newVdom)
listings/ch08/listing_09.js:1
↓ 6 callers
Method
removeItem
(index)
listings/ch07/listing_08.js:9
↓ 6 callers
Function
state
()
listings/ch14/listing_02.js:2
↓ 5 callers
Function
fillSlots
(vdom, externalContent = [])
packages/runtime/src/slots.js:14
↓ 5 callers
Method
isRemoval
(index, newArray)
listings/ch07/listing_07.js:17
↓ 5 callers
Function
mapsDiff
(oldMap, newMap)
packages/runtime/src/utils/maps.js:34
↓ 5 callers
Function
render
()
listings/ch14/listing_02.js:14
↓ 4 callers
Function
extractChildren
(vdom)
packages/runtime/src/h.js:227
↓ 4 callers
Function
h
(tag, props = {}, children = [])
listings/ch11/listing_01.js:10
↓ 4 callers
Function
insert
(el, parentEl, index)
listings/ch08/listing_01.js:1
↓ 4 callers
Method
isNoop
(index, newArray)
listings/ch07/listing_10.js:5
↓ 4 callers
Function
makeButton
()
packages/runtime/src/__tests__/events.test.js:75
↓ 4 callers
Function
mountDOM
( vdom, parentEl, index, /*--add--*/hostComponent = null/*--add--*/ // --1-- )
listings/ch10/listing_04.js:1
↓ 4 callers
Method
noopItem
(index)
listings/ch07/listing_11.js:13
↓ 4 callers
Method
render
()
listings/ch10/listing_12.js:47
↓ 4 callers
Function
renderTodoInReadMode
(todo)
examples/ch02/todos.js:29
↓ 4 callers
Function
renderTodoInReadMode
(todo)
listings/ch02/listing_03.js:21
↓ 4 callers
Method
setAppContext
(appContext)
packages/runtime/src/component.js:90
↓ 4 callers
Function
withoutNulls
(arr)
packages/runtime/src/utils/arrays.js:20
↓ 3 callers
Method
#patch
()
listings/ch10/listing_12.js:75
↓ 3 callers
Method
addItem
(item, index)
listings/ch07/listing_14.js:19
↓ 3 callers
Method
afterEveryCommand
(handler)
listings/ch05/listing_02.js:10
↓ 3 callers
Function
browserNavigateTo
(path)
packages/runtime/src/__tests__/router.test.js:443
↓ 3 callers
Function
createTextNode
(vdom, parentEl/*--add--*/, index/*--add--*/)
listings/ch08/listing_03.js:1
↓ 3 callers
Method
dispatch
(commandName, payload)
listings/ch05/listing_03.js:5
↓ 3 callers
Function
hasOwnProperty
(obj, prop)
packages/runtime/src/utils/objects.js:41
↓ 3 callers
Function
initPackage
* Creates the directory for the package with the given name and copies the * template files. * * @param {string} projectDir the path to the project
packages/cli/src/init.cjs:77
↓ 3 callers
Method
isAddition
(item, fromIdx)
listings/ch07/listing_14.js:4
↓ 3 callers
Function
makeRouteMatcher
(route)
packages/runtime/src/route-matchers.js:66
↓ 3 callers
Function
mapTextNodes
(children)
listings/ch03/listing_04.js:1
↓ 3 callers
Function
patchChildren
(oldVdom, newVdom)
listings/ch08/listing_22.js:1
↓ 3 callers
Function
patchDOM
(oldVdom, newVdom, parentEl)
listings/ch08/listing_07.js:5
↓ 3 callers
Function
patchDOM
(oldVdom, newVdom, parentEl/*--add--*/, hostComponent = null/*--add--*/)
listings/ch09/listing_09.js:1
↓ 3 callers
Function
patchElement
(oldVdom, newVdom)
listings/ch08/listing_11.js:1
↓ 3 callers
Method
render
* Fills in the slots of the component's virtual DOM tree with the passed * in children, and returns the resulting virtual DOM tree. * *
packages/runtime/src/component.js:207
↓ 3 callers
Function
setAttribute
(el, name, value)
packages/runtime/src/attributes.js:43
↓ 3 callers
Method
setExternalContent
* Saves the views passed as children to the vdom that defines the component. * When the component render method is called, this views are placed
packages/runtime/src/component.js:197
↓ 3 callers
Function
setStyle
(el, name, value)
packages/runtime/src/attributes.js:71
↓ 3 callers
Method
subscribe
(commandName, handler)
listings/ch05/listing_01.js:4
↓ 3 callers
Function
traverseDFS
( vdom, processNode, shouldSkipBranch = () => false, parentNode = null, index = null )
packages/runtime/src/traverse-dom.js:20
↓ 3 callers
Method
unmount
()
listings/ch10/listing_12.js:63
↓ 3 callers
Function
writeTodos
(todos)
examples/ch13/todos/todos-repository.js:5
↓ 2 callers
Method
#matchCurrentRoute
()
packages/runtime/src/router.js:378
↓ 2 callers
Method
#patch
()
packages/runtime/src/component.js:282
↓ 2 callers
Function
addEventListener
( eventName, handler, el, /*--add--*/hostComponent = null/*--add--*/ // --3-- )
listings/ch10/listing_03.js:21
↓ 2 callers
Function
addEventListeners
( listeners = {}, el, hostComponent = null )
packages/runtime/src/events.js:10
↓ 2 callers
Function
addEventListeners
( listeners = {}, el, /*--add--*/hostComponent = null/*--add--*/ // --1-- )
listings/ch10/listing_03.js:1
↓ 2 callers
Function
addProps
(el, vdom, hostComponent)
listings/ch12/listing_06.js:5
↓ 2 callers
Function
addProps
(el, props, vdom)
listings/ch04/listing_04.js:17
↓ 2 callers
Function
addTodo
()
examples/ch02/todos.js:85
↓ 2 callers
Function
addTodo
()
listings/ch02/listing_03.js:25
next →
1–100 of 538, ranked by callers