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

pig-latin

v2.0.2

Published

Translate any English text to pig latin (accurately!), because you must be as bored as I am.

Downloads

18

Readme

You're probably sitting there right now thinking, "My project would be so much better if the text were in a childish pseudo-language that is difficult to understand."

I was thinking the same thing too (about your project I mean). So I wrote this package for you.

Installation

npm install pig-latin

Version 2.0

Now with better capitalization support (see below)! Now with EVEN. MORE. BACON.

Capitalization support

We no longer have the 'capitalize' option. Instead, it simply maintains any capitalized word that you send to it.

Usage

Tired of pig-latin packages that don't actually work? We're not messing around here. This package includes:

  • ACCURATE translation of words that start with vowels (with options, because some of you are crazy)
  • ACCURATE dealing with punctuation (mostly -- I'm sure if you really tried you could break it)
// Generic usage
var piglatin = require('pig-latin')
piglatin(text, options)

Let's see some examples:

var piglatin = require('pig-latin')
piglatin("help help, I can't get up!")

=> 'elphay elphay, iway antcay etgay upway!'

Options

This module takes an options object, which currently supports two options:

vowelEnding

Apparently everyone in the world uses a different ending for words that start with vowels. By default it is "-way", but you can set it to any string here you'd like.

// Default
piglatin("I am so happy inside")
=> 'iway amway osay appyhay insideway'

// Example 1 - not so crazy
piglatin("I am so happy inside", {vowelEnding: 'ay'})
=> 'iay amay osay appyhay insideay'

// Example 2 - get as crazy as you want
piglatin("I am so happy inside", {vowelEnding: 'juice'})
=> 'ijuice amjuice osay appyhay insidejuice'

// NOTE: this option only affects words that start with vowels

Items to note

  • Does not support dashes. Those will be removed and replaced with commas.