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

uwfoster-util

v1.0.1

Published

UW Foster School of Business utility functions

Downloads

2

Readme

#uwfoster-util

This module contains utility functions that are common in UW Foster applications.

##Install

npm install uwfoster-util --save

##Use

import uwutil from 'uwsoster-util';

let outputString = uwutil.strFormat.padAndTruncate('A string goes here.', 50);

// outputstring = "A string goes here.                               "

strFormat

The strFormat functions are used to format data for output and return strings.

daysOfWeek

The days of week function takes a comma-separated string or an array of day objects ({ Name: "Monday" }) and returns a 7-character string representing the days passed in. Days not passed in are represented as spaces in their respective position. For example if "Monday, Wednesday, Friday" is passed in, " M W F " is returned.

padAndTrim

The pad and trim function ensures that the passed in string is returned with a specified length. The string is either padded with spaces or trimmed to length.

truncateOnLastComma

The truncate on last comma function takes a comma separated string and trims it at the last comma-separated item to ensure it is shorter than the specified length. The function also adds ellipsis to the end of the string to indicate the list has been truncated.

Authors

  • Kevin Coleman