1.0.0 • Published 8 years ago

touch-icons v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

touch-icons Build Status

Create touch icon data for multiple icon sizes

Install

$ npm install --save touch-icons

Usage

var touchIcons = require('touch-icons')

touchIcons([76], function createHref (size) {
  return size + '.jpg'
})
//=> [{rel: 'icon', sizes: '76x76', href: 76.jpg}, {rel: 'apple-touch-icon', sizes: '76x76', href: '76.jpg'}]

API

touchIcons(sizes, createHref) -> array[object]

sizes

Required
Type: array[number]

An array of pixel sizes for the icons.

createHref

Required
Type: function
Arguments: size

A function that will be called for each size to generate the image URL.

License

MIT © Ben Drucker