
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
hyperloadmore
Advanced tools
a simple paginator
The main goal here is to come up with an interface that could be supported by both an infinite scroller, or a "load more" button. some interfaces also like to have a "load more" at the top, but an infinite scroll at the bottom.
The interface used here is CustomEvents, first hyperloadmore
is created with a content object. The user emits "hasmore" messages
on the content element when there are new elements ready to display.
this updates the button to show the user it's waiting.
When the user clicks the button, the hyperloadmore emits
a readymore event - this tells content to add more elements
to that end... The content is responsible for
deciding how many to add, and if/when there are more to come,
to emit another "hasmore" event.
hasmore events have a .detail.top and .detail.bottom boolean
properties to indicate whether the new content is to be added
at the start or end. ("detail" is a feature of CustomEvents api)
This is also an idea towards a better infinite scroller. We need to decouple the control part from the application. I want the incoming data to be decoupled from the thing which manages the scrolling.
var HyperLoadMore = require('hyperloadmore')
var h = require('hyperscript')
var content = h('content')
content.addEventListener('readymore', function (ev) {
if(ev.detail.bottom) {
for(var i = 0; i < 10; i++)
content.appendChild(createElement(...))
}
})
document.body.appendChild(HyperLoadMore(content))
content.dispatchEvent(
new CustomEvent('hasmore', {target: content, detail: {bottom: true, count: 10}})
)
var HyperLoadMore = require('hyperloadmore')
var Streams = require('hyperloadmore/stream')
var h = require('hyperscript')
var content = h('div.content')
document.body.appendChild(HyperLoadMore(content))
pull(
source,
pull.map(render), //turn into an html element
streams.bottom(content) //stream into the loadmore! that's all!
)
event.target is the element to be added to.
event.detail.top is true if elements should be added to the top.
event.detail.bottom is true if elements should be added to the bottom
when you have new data ready to display, emit the hasmore event.
content.dispatchEvent(new CustomEvent('hasmore', {
target: content,
detail: {
bottom: true, top: false, //bottom should != top
count: N //optional.
}
}))
see also, streams helper
MIT
FAQs
a simple paginator
We found that hyperloadmore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.