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

m-preview-image

v3.1.4

Published

preview image in mobile

Downloads

20

Readme

m-preview-image

m-preview-image let you preview image in mobile ,to make sure image is more smooth , m-preview-image will auto load three image (current , next and last )

browser support

  • android : 4.4 +
  • ios : 8 +
  • IE mobile : 10+

how to get?

  • in browser : download and add a tag :<script src="path-to/preview-image.js">
  • using node :

npm i m-preview-image -S

const previewImageV2 = require('m-preview-image');

don't forget to import style :import "m-preview-image/dist/m-preview-image.css"

how to use?

first you should have a url list just like:

var urls = [
  "http://139.129.33.188:8000/file/read/8418,4259c96c45c811e78eab00163e002820,common",
  "http://139.129.33.188:8000/file/read/8421,426209ce45c811e78eab00163e002820,common",
  "http://139.129.33.188:8000/file/read/8424,426a140245c811e78eab00163e002820,common"
];
  

and then call new PreviewImage({urls: urls}).preview(); when you want to preview images

urls can also be a list of object , when you give me a list of object , key of url should be url,just like :

var urls = [
  {
    url: 'http://icon.nipic.com/BannerPic/20150821/home/20150821102514.jpg',
    optionalRender: '11111111111111'
  }, {
    url: 'http://image.tupian114.com/20140722/20441639.jpg',
    optionalRender: '22222222'
  }, {
    url: 'http://image.tupian114.com/20131219/11432580.jpg',
    optionalRender: '33333333'
  }, {
    url: 'http://image.tupian114.com/20150831/23135049.jpg',
    optionalRender: '44444444'
  }, {
    url: 'http://image.tupian114.com/20100710/23030647.jpg',
    optionalRender: '5555555'
  }, {
    url: 'http://image.tupian114.com/20140923/16420259.jpg',
    optionalRender: '66666666'
  }, {
    url: 'http://image.tupian114.com/20140923/16510218.jpg',
    optionalRender: '7777777'
  }
];
  

param optionalRender can allows you DIY you own render,such as render your own progress.

optionalRendercan now auto replace {index} to current index , {total} to total length of all url,or you can pass a function and return the html you want to render