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 🙏

© 2026 – Pkg Stats / Ryan Hefner

text-enhancer

v1.0.1

Published

A text-enhancer tool that can increase or decrease text size, increase contrast, change font and improve readability for users with dyslexia or other reading impairments.

Readme

text-enhancer

General information

This is a student project and future improvements can't be expected. Feel free to contribute or copy for other projects. MIT license applies.

Purpose

A JavaScript module designed to make text more accessible across different web interfaces. This module allows developers to target different text elements and provide end users with options such as:

  • Resizing the text with a unit-aware logic
  • Switching fonts for better readability (serif/sans as default, but other fonts can be added)
  • Increasing contrast between text and background, by changing background and/or text color.

It is aimed to be especially useful for users with dyslexia (change of fonts), or other visual impairments that is helped by manipulating text size and other factors that affect the readability.

Features

Resize text with some unit aware logic. Switch fonts between serif and sans-serif depending on preferens (possible to add more sets of fonts, even dedicated ones for dyslexia). Fallback for inconclusive inputs Tested with jest and documented in testrapport.md

Installation

npm install text-enhancer

Usage

import { createTextEnhancer } from 'text-enhancer'

const enhancer = createTextEnhancer({
  selectors: ['element', '.class', '#id'],
    step: '2px',
    minSize: 6,
    maxSize: 40,
    root: document
})

// Example: Improve readability for a user with low vision
enhancer.increaseTextSize() // makes targeted elements/classes/id's bigger
enhancer.cycleFontSet() // Cycles through different fonts if original is hard to read.
enhancer.applyColorTheme('highContrast') // Takes over styling of text-element and adds contrasting text- and background-color

API

| Method | Description | |----|----| | increaseTextSize() | Increase text size by one step | | decreaseTextSize() | Decrease text size by one step | | setTextToMax() | Set text size to configured max | | setTextToMin() | Set text size to configured min | | restoreTextSize() | Restore to original size | | cycleFontSet() | Cycles through available font sets | | restoreFontFamily() | Removes font override | | changeTextColor(color) | Apply specified color to text | | changeBackgroundColor(color) | Apply specified color to text-backgrounds | | applyColorTheme(themeName) | Apply predefined color themes | | restoreColors() | Restore the original text and background colors | | updateTarget(newSelectors) | Updates the internal selector list. | | getCurrentFontSet() | Get currently active font set name | | getConfig() | Return a copy of the current config object |

Testing

This module is tested with Jest for automated unit testing. All major logic is covered and all edgecases I could think of as well, such as fallback and conversions.

npm test

See testrapport.md (swedish) for more details

Contributing

As mentioned, this is a student project. Contributions, feedback adn forks are welcome - but future updates are not guaranteed. Feel free to adapt it dor your own needs.

Repository

https://github.com/Pyrre1/text-enhancer

License

MIT