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

fxxkinmethod

v1.0.1

Published

Provides some fxxkin' methods.

Readme

fxxkinmethod

npm version npm downloads types node license

Provides some fxxkin' methods.

English | 日本語

A joke package. It gives you print, puts, var_dump, Println, printf, and friends — each one reproducing the quirks of how that language actually renders values to the terminal.

Ships as both ESM and CommonJS, with full TypeScript types.

Install

npm install fxxkinmethod

Usage

Import the language you want from its subpath — this is the recommended style (only what you use gets bundled):

import { print } from "fxxkinmethod/python";
import { puts, p } from "fxxkinmethod/ruby";

print("hello", "world");   // hello world
puts([1, 2, 3]);           // 1\n2\n3

CommonJS works the same way:

const { print } = require("fxxkinmethod/python");
const { printf } = require("fxxkinmethod/c");

print("hello", "world");
printf("%5.2f\n", 3.14159); //  3.14

Prefer a single import?

You can still grab every language as a namespace from the package root:

import { python, ruby, php, go, c } from "fxxkinmethod";

python.print("hello", "world");        // hello world
ruby.puts([1, 2, 3]);                  // 1\n2\n3
php.var_dump("hi");                    // string(2) "hi"
go.Printf("%d items\n", 3);            // 3 items
c.printf("%5.2f\n", 3.14159);          //  3.14

Supported languages

| Subpath | Functions | | ---------------------- | ------------------------------------------ | | fxxkinmethod/python | print, pprint, pformat, str, repr | | fxxkinmethod/ruby | puts, print, p, pp, printf, sprintf/format, warn, putc, toS, inspect | | fxxkinmethod/php | echo, print, printf, sprintf, vprintf, vsprintf, print_r, var_dump, var_export | | fxxkinmethod/go | Print, Println, Printf, Sprint, Sprintln, Sprintf, Fprint, Fprintln, Fprintf | | fxxkinmethod/c | printf, fprintf, sprintf, snprintf, puts, fputs, putchar, fputc, perror |

Functions that write to a stream take a stream argument or option: Python print(…, { file: "stderr" }), Go Fprintln(go.Stderr, …), C fprintf(c.stderr, …). Ruby's warn and C's perror go to stderr.

Constants

Each language also exports the names it spells differently from plain JS (things JS already has — true, false, null, NaN, Infinity — are not redefined):

| Subpath | Constants | | ---------------------- | ------------------------------------------ | | fxxkinmethod/python | True, False, None, Ellipsis, math.nan / math.inf | | fxxkinmethod/ruby | nil, end, _, Float.NAN / Float.INFINITY | | fxxkinmethod/php | NAN, INF, PHP_EOL | | fxxkinmethod/go | nil, _, math.NaN() / math.Inf(sign) | | fxxkinmethod/c | NULL, EOF, NAN, INFINITY |

Yes, you can import Ruby's end and close your blocks in style:

import { puts, nil, end } from "fxxkinmethod/ruby";

if (nil === null) {
  puts("nil is null");
}
end;

The quirks it reproduces

  • PythonTrue / False / None, lists as [1, 'a', True], dicts as {'a': 1}, and print(..., { sep, end }) keyword-style options.
  • Rubyputs flattens arrays one-element-per-line and won't double a trailing newline; p prints the inspect form ("hi", nil) and returns its argument.
  • PHPecho true prints 1, echo false prints nothing; var_dump reports byte lengths (string(2) "hi"); print_r reproduces the indented Array ( … ) layout.
  • Gofmt.Print only inserts a space when neither neighbour is a string; slices print as [1 2 3], maps as map[a:1 b:2], nil as <nil>.
  • Cprintf supports %d %i %u %o %x %X %b %f %e %g %s %c, flags -+ 0#, width and precision (including *); puts always appends \n.

Contributing

Contributions are welcome! See CONTRIBUTING.md for how to file an issue, open a pull request, and set up the project locally. Requires Node.js >= 18.

License

MIT © otoneko.