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

@igorskyflyer/chars-in-string

v3.0.0

Published

🪐 Determines whether an array of chars is present inside a given String. ☄

Readme

📃 Table of Contents

🤖 Features

  • 🔍 Find instantly - See if your text contains what you’re looking for
  • 🎯 Target precisely - Match at the start, end, or anywhere in the text
  • 🔠 Match your way - Choose case‑sensitive or case‑insensitive search
  • 🧮 Works with one or many - Search for single characters or whole words/phrases
  • ⚡ Quick answers - Stops searching as soon as a match is found
  • 🌍 Cross‑platform friendly - Works the same on any OS or environment

🕵🏼 Usage

Install it by executing any of the following, depending on your preferred package manager:

pnpm add @igorskyflyer/chars-in-string
yarn add @igorskyflyer/chars-in-string
npm i @igorskyflyer/chars-in-string

🤹🏼 API

An enum is available publicly, used for setting the position of the search, see more below. 👇

enum Position {
  Any,
  Start,
  End
}

It allows you define where the matching should occur, at the beginning of the String, at the end or anywhere (default).

function charsInString(characters: string[], input: string, position = Position.Any, caseSensitive = true): boolean

characters: string[] - the characters to search for, expects a single character per entry, if multiple are found it will take the first one,

input: string - the String which needs to be checked,

[position: Position=Position.Any] - controls where the matching should occur, at the beginning of the String, at the end or anywhere (default),

[caseSensitive: boolean=true] - controls whether the search is case-sensitive, defaults to true.

function stringsInString(strings, input, position = Position.Any, caseSensitive = true): boolean

strings[]: string[] - the strings to search for,

input: string - the String which needs to be checked,

[position: Position=Position.Any] - controls where the matching should occur, at the beginning of the String, at the end or anywhere (default),

[caseSensitive: boolean=true] - controls whether the search is case-sensitive, defaults to true.

🗒️ Examples

import { charsInString, stringsInString, Position } from '@igorskyflyer/chars-in-string'

console.log(charsInString([], '')) // prints false
console.log(charsInString([], 'test')) // prints false
console.log(charsInString([':', ','], '')) // prints false
console.log(charsInString([':', ','], 'hello:world')) // prints true
console.log(charsInString([':', ',', '^'], 'helloworld^')) // prints true
console.log(charsInString([':', ',', '^'], 'helloworld')) // prints false
console.log(stringsInString(['abc', 'owom', 'wqp', 'world', 'hel'], 'helloworld', Position.Start)) // prints true

📝 Changelog

📑 The changelog is available here, CHANGELOG.md.

🪪 License

Licensed under the MIT license which is available here, MIT license.

💖 Support

🧬 Related

@igorskyflyer/str-is-in

🧵 Provides ways of checking whether a String is present in an Array of Strings using custom Comparators. 🔍

@igorskyflyer/recursive-readdir

📖 Provides recursive readdir() and readdirSync() functions. 📁

@igorskyflyer/astro-post-excerpt

⭐ An Astro component that renders post excerpts for your Astro blog - directly from your Markdown and MDX files. Astro v2+ collections are supported as well! 💎

@igorskyflyer/adblock-filter-counter

🐲 A dead simple npm module that counts Adblock filter rules.🦘

@igorskyflyer/scramble

🃏 Scrambles (rearranges randomly) Strings and Arrays. 🎋

👨🏻‍💻 Author

Created by Igor Dimitrijević (@igorskyflyer).