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

@eternaljs/base64-info

v1.1.0

Published

Enhance base64 workflows. Swiftly retrieve type, extension, and content info. Simplify binary data management for smoother project integration.

Downloads

57

Readme

Base64 Info

The base64-info npm package is a lightweight and efficient utility that simplifies working with base64 encoded strings by providing convenient methods to extract crucial details. With this package, you can effortlessly determine the type, extension, and content of base64 strings, making it an essential tool for developers dealing with binary data conversions.

Key Features:

  • Type Detection: Easily identify the type of data represented by a base64 string, whether it's an image, audio, video, or other file formats.

  • Extension Inference: Automatically infer the file extension associated with the base64 content, ensuring accurate representation when decoding or processing the data.

  • Content Extraction: Retrieve the binary content from a base64 string, enabling seamless integration with various data manipulation workflows.

  • Efficient Performance: Designed for optimal performance, base64-info provides quick and reliable results, suitable for both small and large-scale applications.

Whether you're building applications that involve image uploading, multimedia handling, or file conversion, base64-info streamlines the process of working with base64 encoded data, allowing you to focus on delivering robust and feature-rich applications.

Installing

Using npm:

$ npm install @eternaljs/base64-info

Using yarn:

$ yarn add @eternaljs/base64-info

Imports

// JavaScript
const { getBase64Info } = require("@eternaljs/base64-info");

// TypeScript
import { getBase64Info } from "@eternaljs/base64-info";

Usage

These examples assume you're in node, or something similar:

const base64Details = getBase64Info(base64String);

// Log
console.log(base64Details);

// Output
{
    "name": "JPEG",
    "type": "image/jpeg",
    "sign": "/9j/4AAQSk",
    "extension": "jpeg",
    "content": "data:image/jpeg;base64",
    "category": "image",
    "base64": "/9j/4AAQSkZJRgABAQEASABIAAD"
}

Supported files extension

jpeg, jpg, png, jfif, gif, webp, xcf, bmp, cur, dds, exr, fts, hdr, ico, jpe, jps, mng, pam, pbm, pcd, pcx, pgm, picon, pict, pnm, ppm, psd, ras, sgi, svg, tga, tiff, wbmp, xbm, xpm, xwd, erf, heic, jp2, pes, pfm, heif, swf, dng, orf, X3F, nrw, rw2, nef, pef, raf, cr2, xlsx, xls, txt, ott, odt, ods, odp, djvu, doc, csv, ppt, rtf, docx, pdf, cvsd, cvu, gsrt, hcom, m4a, mp3, ogg, opus, prc, sln, spx, txw, vms, wve, cvs, dvms, m4r, wma, ima, ra, vox, aac, sndr, sndt, ac3, 8svx, fssd, htk, smp, sou, aiff, flac, oga, tta, wv, sd2, amb, au, avr, caf, cdda, dts, fap, ircam, maud, nist, paf, pvf, snd, sph, voc, w64, wav, bat, htaccess, json, kml, sql, c, cpp, cs, css, go, h, java, pl, py, rb, sh, html, html, swift, test, vb, yaml, class, js, snb, pdb, mobi, lrf, fb2, epub, azw3, woff, ttf, sfd, ps, pfb, otf, bin, dfont, cff

License

MIT