1.0.3 • Published 5 years ago

@izziedee1/tiny v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

tiny

Tutorial for tiny based on https://medium.freecodecamp.org/how-to-make-a-beautiful-tiny-npm-package-and-publish-it-2881d4307f7

Some things I had to figure out which were not explicitly pointed out by original author. In particular, I was confused by the combination of creating the package, tiny and the using of tiny as a package in another project.

The index.js of the tiny project contains the code:

module.exports = function tiny(string) {
  if (typeof string !== "string") throw new TypeError("Tiny wants a string!");
  return string.replace(/\s/g, "");
};