npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

waterfall-dt

v1.1.0

Published

`npm install waterfall-dt`

Downloads

3

Readme

GetStart

step1 install it

npm install waterfall-dt

step2 how to use

first, you need to create a HTMLElemnt or select one that already have in your web page, for example: <div id="wf"></div>

second, you need to require the module you just install before and then you can easily use it, just like the following:

//commonJS
const WaterFall = require('waterfall-dt');
let wf = WaterFall.create({
  el: 'wf', // The container's id, must have
  width: 300, // the picture's width, default value is 232
  gap: 20, // the gap between two pictures, default value is 10
  cols: 4 // colums, default value is 5
  unit: 'px' // unit, default value is 'px', only support 'px' and 'rem'
  lazy: false // Indicates whether the image is lazy to load, default valut is false
})

// or es6
// import { create } from 'waterfall-dt'
// let wf = create({
//   el: 'wf', // The container's id, must have
//   width: 300, // the picture's width, default value is 232
//   gap: 20, // the gap between two pictures, default value is 10
//   cols: 4 // colums, default value is 5
//   unit: 'px' // unit, default value is 'px', only support 'px' and 'rem'
//   lazy: false // Indicates whether the image is lazy to load, default valut is false
// })

// you need the imgs'format like this:
const imgs = [
  {"img":"../img/1.jpg","width":2560,"height":1600},
{"img":"../img/2.jpg","width":1366,"height":768},
{"img":"../img/3.jpg","width":1920,"height":1080},
{"img":"../img/4.jpg","width":1600,"height":2840}]

wf.append(imgs) // to show waterfall images

more about lazyload

If you want to use custom lazy-loaded transition images or svgs, you can rewrite lazy to an object with the use parameter set to true and the URL parameter set to the address of the custom image, Here's an example:

const WaterFall = require('waterfall-dt');
let wf = WaterFall.create({
  el: 'wf',
  lazy: {
    use: true,
    url: 'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2955301104,3476101192&fm=26&gp=0.jpg'
  }
})

Notice

Notice that when creating a wf instance using the create method, keep the format of the incoming parameters consistent. imgs is a list of images that need to be passed in as described above

If you have questions, please send an email to [email protected]