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

@vyke/fns

v0.0.4

Published

Several functions with different scopes and small in nature

Downloads

5

Readme

Several functions with different scopes and small in nature

Installation

npm i @vyke/fns -D

API

outItem

Filter out an item from an array

const arr = [1, 2, 3, 4, 5]
const filtered = arr.filter(outItem(3))
console.log(filtered) // [1, 2, 4, 5]

compareBy

Sorts an array of objects by a property.

const arr = [
	{ name: 'John', age: 25 },
	{ name: 'Jane', age: 22 },
	{ name: 'Doe', age: 30 }
]
const sorted = arr.sort(compareBy('age'))
console.log(sorted)
// [
//  { name: 'Jane', age: 22 },
//  { name: 'John', age: 25 },
//  { name: 'Doe', age: 30 }
// ]

mapToUnit

Re-maps a number from one range to 0-1 and constrains the value.

const mapped = mapToUnit(50, 0, 100)
console.log(mapped) // 0.5

map

Re-maps a number from one range to another.

const mapped = map(50, 0, 100, 0, 200)
console.log(mapped) // 100

constrain

Constrains a value to not exceed a maximum and minimum value.

const constrained = constrain(150, 0, 100)
console.log(constrained) // 100

noop

A function that does nothing.

easeInSine

Easing function that accelerates quickly and then slows down.

easeOutSine

Easing function that decelerates quickly and then slows down.

easeInOutSine

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInQuad

Easing function that accelerates quickly and then slows down.

easeOutQuad

Easing function that decelerates quickly and then slows down.

easeInOutQuad

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInCubic

Easing function that accelerates quickly and then slows down.

easeOutCubic

Easing function that decelerates quickly and then slows down.

easeInOutCubic

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInQuart

Easing function that accelerates quickly and then slows down.

easeOutQuart

Easing function that decelerates quickly and then slows down.

easeInOutQuart

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInQuint

Easing function that accelerates quickly and then slows down.

easeOutQuint

Easing function that decelerates quickly and then slows down.

easeInOutQuint

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInExpo

Easing function that accelerates quickly and then slows down.

easeOutExpo

Easing function that decelerates quickly and then slows down.

easeInOutExpo

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInCirc

Easing function that accelerates quickly and then slows down.

easeOutCirc

Easing function that decelerates quickly and then slows down.

easeInOutCirc

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInBack

Easing function that accelerates quickly and then slows down.

easeOutBack

Easing function that decelerates quickly and then slows down.

easeInOutBack

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInElastic

Easing function that accelerates quickly and then slows down.

easeOutElastic

Easing function that decelerates quickly and then slows down.

easeInOutElastic

Easing function that accelerates quickly, slows down, and then accelerates again.

easeInBounce

Easing function that accelerates quickly and then slows down.

easeOutBounce

Easing function that decelerates quickly and then slows down.

easeInOutBounce

Easing function that accelerates quickly, slows down, and then accelerates again.

Others vyke projects