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

granny

v0.2.10

Published

A clint library for Granny image delivery server

Downloads

26

Readme

A client library from Granny server

A library for Granny image delivery server

npm Join the chat at https://gitter.im/granny-js/community

Ecosystem

image

granny-server-backend - Backend service with API exposed to upload and serve/manipulate images
granny-js-client - Client library that works both in nodejs and browser. Makes API calls easier
granny-server-frontend - Frontend APP that uses client to manage your CDN domains and settings
granny-server-cron - Utility app

Setup

This library can be used in both nodejs and browser environment. Browser clint made only for staging or admin panel development, because you can expose your credentials in browser.

NPM

npm i granny

Building from source

git clone [email protected]:mrspartak/granny-js-client.git
cd granny-js-client

//if you need browser version
npm run build
//request to your browser build/index.js

//if you need nodejs version it is stored in src/index.js

Or download latest release
npm

Basic usage

Nodejs

const Granny = require('granny')

const grannyApi = new Granny({
	domain: 'https://cdn.example.com', //url to Granny server backend
	accessKey: 'key',
	accessSecret: 'secret'
})

var [err, result] = await grannyApi.uploadImage({path: '/users/sergio.jpeg', image: './tmp/DSCF6278.jpg'})
console.log(result.imageUrl)
/*
	result.imageUrl = https://cdn.example.com/i/users/sergio.jpeg

	Now you can use direct link or modify image on fly
	https://cdn.example.com/i/r=100/_/users/sergio.jpeg - will resize image to 100x100
	https://cdn.example.com/i/width=500,format=webp/_/users/sergio.jpeg - will resize to width=500 saving aspect ratio and format to webp
*/

API

Currently here: https://github.com/mrspartak/granny-js-client/blob/master/API.md