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

scoopy-str-helper

v1.0.1

Published

This library is to assist people in doing some common and not so common string manipulation. Many of the operations are simple, yet can be tedious at times. I aim to help people cut down the time it takes to perform these tedious operations and place some

Readme

StringHelper

This library is to assist people in doing some common and not so common string manipulation. Many of the operations are simple, yet can be tedious at times. I aim to help people cut down the time it takes to perform these tedious operations and place some neat string manipulation techniques within a few easy to use methods.

Initialize

const strHelper = require('scoopy-str-helper')

Methods

capitalize(str) - takes in a string and capitalizes the first letter of the string. Returns a new version of the string.

ex. capitalize("hello") -> "Hello"

allCaps(str) - takes in a string and uppercases the entire string.

ex. allCaps("hello") -> "HELLO"

capitalizeWords(str) - takes in a string and capitalizes the first letter of each word in the string. Returns a single string.

ex. capitalizeWords("hello world") -> "Hello World"

capitalizeHeadline(str) - takes in a string and capitalizes the first letter of each word UNLESS it is a common outlier like 'the', 'in', 'a', 'and', etc. If the outlier is the first word in the string, it WILL be capitalized.

ex. capitalizeHeadline("in a world of people") -> "In a World of People"

removeExtraSpaces(str) - takes in a string and removes all spaces, including tabs, returns, and newlines and returns the string. Note: Keeps single spaces between words.

ex. removeExtraSpaces(" Hello world! ") -> "Hello world!"

kebobCase(str, delimiter) - takes in a string and a delimiter. Delimiter is set to '-' by default for kebob case. Lowercases all words and characters in the string, and removes any special characters aside from the hyphen. Returns the string in correct kebob casing.

ex. kebobCase("$Hello world!!!!!") -> "hello-world"

snakeCase(str) - takes in a string, lowercases the string and removes special characters aside from the hyphen. Concatenates separate words with an underscore ("_")

ex. snakeCase("$Hello world!!!") -> "hello_world"

camelCase(str) - takes in a string, lowercases the first letter of the first word, and capitalizes the first letter of other words in the string. Returns string of camelCased words with extra spaces removed around and between words.

ex. camelCase(" The best camel case") -> theBestCamelCase

shift(str, numChars) - takes in a string and number of characters. Method shifts the first numChars characters to the end of the string, and returns the resulting string.

ex. shift("fooBar", 3) -> Barfoo

makeHashTag(str) - takes in a string and returns the 3 longest words as hashtags. A hashtag in this method is defined as a string that begins with a '#' and is capitalized. If there are less than 3 words available, it will return all words as hashtags. Return strings are in an array.

ex. makeHashTag("totally amazing game of basketball") -> [ '#Basketball', '#Amazing', '#Totally' ]

isEmpty(str) - takes in a string and removes all extra white space and spaces between any possible words. If nothing remains, the result is True (bool). If there is anything other than white space, returns false.

ex. isEmpty(" \n \t ") -> True