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

mfers

v1.3.1

Published

quick and easy access to mfers metadata

Downloads

34

Readme

Overview

  • Access trait metadata for all mfers
  • Metadata compressed from 7.5MB ~> 75kB
  • Isomorphic: works on both NodeJS and browser

Looking for JSON data files? Check here

Install

Via NPM:

npm install mfers

NodeJS

// ES6 Syntax
import { mfers, traits, MFERS_CONTRACT } from 'mfers';

// CJS syntax
const { mfers, traits, MFERS_CONTRACT } = require('mfers');

Browser Module (via skypack):

import { mfers, traits, MFERS_CONTRACT } from 'https://cdn.skypack.dev/mfers';

API

mfers

An ordered array of mfer metadata. Index in array = mfer token id (mfer #3664 ~> mfer[3664])

Each mfer provides traits, colors, and description

import { mfers } from 'mfers';

mfers[3664]
// {
//    i: 3664,
//    traits: {
//      "background": "blue",
//      "type": "plain mfer",
//      "eyes": "3D glasses",
//      "mouth": "smile",
//      "headphones": "gold headphones",
//      "hat over headphones": "hoodie",
//      "smoke": "cig white"
//    },
//    colors: [
//      '#000000', '#ffffff', '#353535', '#191919',
//      '#141414', '#e2aa46', '#c48d2e', '#e59f5f',
//      '#7dd0ff', '#313131', '#558aff', '#1350d8',
//      '#b90000', '#ff2222', '#fa3434'
//    ],
//    description: "a simple hand-drawn stick figure wearing
//      3D glasses with red and blue lenses with a soft smile
//      and smoking a cig. They have no hair, are wearing
//      gold headphones, and are wearing a dark gray hoodie
//      with the hood up over the headphones"
// }

traits

An object containing all possible variations for each trait

import { traits } from 'mfers';

Object.keys(traits)
// ~> [ "chain", "hat over headphones", "short hair", ... ]

traits['chain']
// ~> [ "silver chain", "gold chain" ]

traits['hat over headphones']
// ~> [ "cowboy hat", "top hat", "hoodie", "pilot helmet" ]

colors

An object containing an array of colors for each trait variant (not including 1/1's). Output array is sorted by number of pixels the color occupies in the layer.

import { colors } from 'mfers';

colors['headphones']['pink headphones']
// ~> [ "#ff9295", "#000000", "#ff7174"]

colors['background']['graveyard']
// ~> [ "#7c7c7c", "#090908", "#a7a7a5", "#ffc954", "#686867"]

colors['eyes']['purple shades']
// ~> [ "#000000", "#952791", "#6b2768", "#f147eb"]

describe_traits(mfer_traits)

A function that describes arbitrary trait combinations using plain english, ideal for LLMs and GPTs. This was used for MferGPT

MFERS_CONTRACT

Contract address for mfers

import { MFERS_CONTRACT } from 'mfers';
  
MFERS_CONTRACT
// ~> "0x79fcdef22feed20eddacbb2587640e45491b757f"

Why?

mfers is an NFT collection that lives on the Ethereum blockchain with metadata stored on IPFS. Instead of manually downloading and parsing 10k JSON files, you can just import this library! The metadata is stored in a compressed format, reducing the network payload by 100x (7.5 MB ~> 75 kB)

Use Case Inspiration

  • Tailored media generators
  • mfer dapp theming (color schemes + trait-specific designs)
  • Derivative projects
  • Sniping aesthetic trait combinations

Acknowledgements

mfers (by sartoshi) is a cc0 project, giving creators and developers the freedom to build things like this. Enjoy mfers ~