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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jsbakery

v0.0.3

Published

Bake up your javascript using the new bake module

Readme

jsbake

jsbake is a Node.js module that provides various utility classes and functions for file operations, color manipulation, tuples, dice rolling, and converting between RGB and hexadecimal color representations.

Installation

You can install jsbake via npm:

npm install jsbake

Usage

const jsbake = require('jsbake');
const Mix = new jsbake
Mix
// FileOperations
// Create a new folder and file
const folder = new Mix.FileOperations.Folder('example_folder');
folder.Create();
const file = new Mix.FileOperations.File('example_folder/example.txt', 'Hello, world!');
file.Create();

// ColorPalette
// Generate a color palette in Advanced mode
const colorPalette = new Mix.ColorPalette('Advanced');
console.log(colorPalette.Colors.Hex);

// Tuple
// Create an immutable tuple
const Tuple = new Mix.Tuple;
const myTuple = new Tuple(1, 2, 3);

// Dice
// Roll a six-sided die three times
const dice = new Mix.Dice();
const rolls = dice.Roll(3, 6);
console.log(rolls);

// RGB2Hex and Hex2RGB
// Convert RGB to hexadecimal
const RGB2Hex = new Mix.RGB2Hex;
const Hex2RGB = new Mix.Hex2RGB;
const hexValue = RGB2Hex(255, 0, 0);
console.log(hexValue); // Output: #ff0000

// Convert hexadecimal to RGB
const rgbValues = Hex2RGB('#00ff00');
console.log(rgbValues); // Output: [0, 255, 0]

// Bake
// Import specific modules

utilities.ImportModule(["FileOperations", "ColorPalette", "Tuple", "Dice", "RGB2Hex", "Hex2RGB"]);

// Use imported modules
// (See examples above for specific module usage)

Features Overview

FileOperations

Folder Class:

  • constructor(path)
  • Create()
  • Write(file)
  • Contents()
  • Delete()

File Class:

  • constructor(path, content)
  • Create()
  • Write(data)
  • Read()
  • SyncPush()
  • SyncPull()
  • Delete()

ImportFolder Class:

  • Inherits all features from the Folder class.
  • Automatically imports files from a specified folder.

ImportFile Class:

  • Inherits all features from the File class.
  • Automatically imports content from a specified file.

FilePerms Function:

  • FilePerms(path, perms)

ColorPalette

ColorPalette Class:

  • constructor(mode)

Tuple

Tuple Class:

  • constructor(...values)

Dice

Dice Class:

  • constructor()
  • Roll(Dice, Sides)

RGB2Hex and Hex2RGB

RGB2Hex Function:

  • RGB2Hex(R, G, B)

Hex2RGB Function:

  • Hex2RGB(Hex)

Location Class

  • new Location(latitude, longitude);
  • currentLocation.calculateDistance(destination);

Bake

Bake Class:

  • constructor()
  • ImportModule(modules, imports)

More modules coming soon...