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

gif-me-info

v1.0.3

Published

Promise based extension of gify-parse returning gif statistics for single or array of gif urls.

Downloads

8

Readme

gif-me-info

Promise-based gif information and stats.

Install

npm i gif-me-info

Notes

Provides promised results for gify-parse allowing users to get information for a single gif url or an array of gif urls.

Updates:

  • 1.0.3: removed axios dependency in favor of smaller node-fetch

Authors

Table of Contents

  1. How to Use
  2. Usage
  3. Info Properties
  4. Requirements
  5. Contributing
  6. Acknowledgments

Usage

npm i gif-me-info

How to Use

// Require or import the package (name it anything you'd like) wherever you'd like to use it:
const gifInfo = require('gif-me-info');

// Function takes in a single url or array of gif urls
let gifUrls = [
  'http://media2.giphy.com/media/FiGiRei2ICzzG/200.gif',
  'http://media0.giphy.com/media/feqkVgjJpYtjy/200.gif'
];

// Use an async function to await the results
const asyncExample = async () => {
  let result = await gifInfo(gifUrls);
  console.log(result);
}


// Or use .then promise chain to access results 
const promiseExample = () => {
  gifInfo(gifUrls)
  .then(results => console.log(results))
};

/* Sample results: (Data format: Array of objects)
[
    {
        "valid": true,
        "globalPalette": true,
        "globalPaletteSize": 256,
        "globalPaletteColorsRGB": [
            {
                "r": 217,
                "g": 217,
                "b": 217
            }, ...more
        ],
        "loopCount": 0,
        "height": 832,
        "width": 1264,
        "animated": true,
        "images": [
            {
                "identifier": "0",
                "localPalette": false,
                "localPaletteSize": 0,
                "interlace": false,
                "comments": [],
                "text": "",
                "left": 0,
                "top": 0,
                "width": 1264,
                "height": 832,
                "delay": 30,
                "disposal": 1
            },
            {
                "identifier": "1",
                "localPalette": false,
                "localPaletteSize": 0,
                "interlace": false,
                "comments": [],
                "text": "",
                "left": 0,
                "top": 0,
                "width": 1,
                "height": 1,
                "delay": 30,
                "disposal": 1
            },
            {
                "identifier": "2",
                "localPalette": false,
                "localPaletteSize": 0,
                "interlace": false,
                "comments": [],
                "text": "",
                "left": 0,
                "top": 0,
                "width": 1,
                "height": 1,
                "delay": 30,
                "disposal": 1
            },
            ...more
        ],
        "isBrowserDuration": true,
        "duration": 7230,
        "durationIE": 24100,
        "durationSafari": 7230,
        "durationFirefox": 7230,
        "durationChrome": 7230,
        "durationOpera": 7230,
        "url": "http://devcenter.wintellect.com/wp-content/uploads/2016/10/Spectron.gif"
    }
] */

Info Properties

All of the properties provided by gify-parse module.

Requirements

  • Node >= 8

Contributing

This is just an encapsulation of the gify-parse package (which does the bulk of the work) created for another project, but if you would like to contribute please make a pull request with your work. Feel free to contact me and introduce yourself as well.

Acknowledgments