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

freshkitetwenty

v0.0.2

Published

An NPM package solving 20 unique beginner programming problems.

Readme

FreshKiteTwenty

FreshKiteTwenty is an NPM package that provides solutions to 20 beginner-level programming problems. It is designed to help developers practice and enhance their problem-solving skills with simple and efficient JavaScript functions.

Installation

You can install FreshKiteTwenty using npm:

npm install freshkitetwenty

Usage

Import the package in your project and use the available functions:

ES Module (ESM)

import { isPrime, factorial, twoSum } from "freshkitetwenty";

console.log(isPrime(7)); // true
console.log(factorial(5)); // 120
console.log(twoSum([2, 7, 11, 15], 9)); // [0, 1]

Available Functions

The package provides solutions to the following problems:

  • oddOrEven(n) – Determines if a number is odd or even.
  • swapTwoVariables(a, b) – Swaps two numbers without using a temporary variable.
  • isLeapYear(n) – Checks if a given year is a leap year.
  • isBinary(n) – Checks if a number consists only of 0s and 1s.
  • sumOfDigits(n) – Computes the sum of digits of a number.
  • factorial(n) – Finds the factorial of a given number.
  • isPrime(n) – Checks if a number is prime.
  • fibonacciNumber(n) – Returns the nth Fibonacci number.
  • isPalindromeNumber(n) – Checks if a number is a palindrome.
  • isPalindromeString(s) – Checks if a string is a palindrome.
  • isArmstrongNumber(n) – Checks if a 3-digit number is an Armstrong number.
  • findGCD(a, b) – Finds the greatest common divisor (GCD) of two numbers.
  • isPerfectNumber(n) – Determines if a number is perfect.
  • countDividingDigits(n) – Counts the digits of a number that evenly divide it.
  • floorSquareRoot(n) – Finds the square root of a number (floored if not perfect).
  • powerOfReverse(n) – Computes n raised to the power of its reverse.
  • findMinMax(arr) – Finds the minimum and maximum elements in an array.
  • findSecondMax(arr) – Finds the second largest element in an array.
  • countArrayFrequency(arr, n) – Counts the frequency of numbers in an array (1-based indexing).
  • twoSum(arr, target) – Returns indices of two numbers that sum up to the target.

Contributing

Feel free to contribute to this project by opening an issue or submitting a pull request on GitHub.

License

This project is licensed under the MIT License.

Author

Created by Harish Vijendiran student at Freshkite Academy.

Links