New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hypermore

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypermore

load more elements when you hit a 'show more' button

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

hypermore

more hyper when you click a button.

example

provide a reduce function, a pull stream, and a render function. and then attach obv.more() to a button.

var PullObv = require('pull-obv')
var More = require('hypermore')
var h = require('mutant/h') //or hyperscript
var pull = require('pull-stream')


var obv = More(
  //pass a pull-obv instance as first arg.
  PullObv(function (ary, item) {
    return ary.concat(item)
  }, pull.infinite(), [])
function (list, el) {
  //you might also use morphdom or just mutate the same element.
  return h('ol', list.map(function (n) { return h('li', ''+n) }))
})

document.body.appendChild(
  h('div.content', obv, h('button', {'ev-click': obv.more}, ['Show More']))
)

when you hit call obv.more() it will stream data until the target element takes up the current size + screen height.

License

MIT

FAQs

Package last updated on 13 Aug 2017

Did you know?

Socket

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.

Install

Related posts