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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tikotalks/media

v0.1.10

Published

Image data management package for Yes-No app

Downloads

89

Readme

Tiko Media

A TypeScript package for managing and accessing image data from a Google Sheets source, specifically designed for the Yes-No app. This package provides utilities to fetch, search, and filter images based on various criteria such as tags, categories, and names.

Features

  • Fetch and sync image data from Google Sheets
  • Search images by tags, categories, or text
  • Get image URLs in different sizes (thumbnail, medium, original)
  • TypeScript support with full type definitions
  • Easy-to-use composable functions

Installation

npm install @tikotalks/media

Usage

Basic Usage

import { useImages } from '@tikotalks/media';

const { findImage, searchImages, getImageUrl } = useImages();

// Find a single image by ID or name
const image = findImage('my-image-name');

// Search images by tags
const results = searchImages(['nature', 'animals']);

// Get image URL by ID/name and size
const imageUrl = getImageUrl('my-image-name', 'medium');

Available Functions

  • findImageByName(name: string): Find an image by its name
  • findImageById(id: string): Find an image by its ID
  • findImage(value: string): Find an image by either ID or name
  • findImagesByTag(tag: string): Find all images with a specific tag
  • searchImages(tags: string[]): Search images by multiple tags/categories/text
  • getImageUrl(idOrName: string, type?: 'thumbnail' | 'original' | 'medium'): Get image URL by size

Google Sheets Integration

Setup

  1. Create a Google Cloud Project and enable the Google Sheets API
  2. Create a service account and download the credentials
  3. Create a .env file with the following variables:
GOOGLE_SERVICE_TYPE=service_account
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_PRIVATE_KEY_ID=your-private-key-id
GOOGLE_PRIVATE_KEY=your-private-key
GOOGLE_CLIENT_EMAIL=your-service-account-email
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
GOOGLE_TOKEN_URI=https://oauth2.googleapis.com/token
GOOGLE_AUTH_PROVIDER_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
GOOGLE_CLIENT_CERT_URL=your-client-cert-url

Fetching Data

Run the fetch script to sync data from Google Sheets:

npm run fetch

This will update the local image data in src/data/images.ts.

Development

# Install dependencies
npm install

# Fetch latest data
npm run fetch

# Build the package
npm run build

# Run tests
npm test

# Development mode with watch
npm run dev

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.