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

gh-feature-switch

v1.0.1

Published

Feature switches implemented for React

Readme

  • gh-feature-switch

** Getting started

Running tests: #+BEGIN_SRC shell $ npm install $ npm test #+END_SRC

The above will install all dependencies and run eslint, then (if it passes), ava. Since this is an entirely non-visual component, the functionality can be easily checked with automated enzyme tests.

** Usage

This component implements simple feature switches for React applications. The feature switch component accepts 3 props:

  • ~children~ - to be conditionally rendered
  • ~all~ - a list of conditions, all of which have to be satisfied in order to render children
  • ~either~ - a list of conditions, any of which have to be satisifed in order to render children

In case both ~all~ and ~either~ are supplied, ~either~ will be ignored.

** Contributing

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

The following rules SHALL be applied to code reviews. Contributions breaking any of these rules SHALL NOT be merged. This is to ensure consistent code style and quality.

  • ~npm test~ MUST pass with no errors, specifically:

    • ESLint MUST pass with no errors
    • ESLint MAY return warnings, but they SHOULD be fixed as soon as possible whenever it is feasible to do so without considerable effort
    • Tests MUST pass with no errors
  • ESLint rules MUST NOT be modified, unless they are inconsistent with the main Growth House Dashboard repository, in which case they MUST BE brought up to date before merging any changes.

** About

Created by [[https://gitlab.idium.no/aleks][Aleksander Świątkowski]].