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

@dxtmisha/functional-basic

v1.4.1

Published

Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.

Readme

@dxtmisha/functional-basic

npm version License: MIT Node.js Version

@dxtmisha/functional-basic is a foundational utility library for modern web development. It's framework-agnostic and can be used in any TypeScript project — whether Vue, React, Nuxt, or plain browser code.

Why this library?

Every web application inevitably faces the same set of challenges: HTTP requests, localization, dates, cookies, caching, loading states. Typically each project solves these in its own way, accumulating scattered utilities that are spread across folders, duplicated between projects, and grow stale over time.

functional-basic brings all these solutions together in one place — thoughtful, tested, and ready to use. It's not a mega-framework with strict conventions, but a library: pick only what you need and use it however works best for you.

What does it do?

For networking — a full-featured HTTP client with lifecycle hooks, response caching, header management, response mocking for development, and an integrated loading state. Requests can be cancelled, configured, and extended — without pulling in extra dependencies.

For geolocation and internationalization — automatic detection of the user's country and language, locale-aware formatting of numbers, dates, currencies, and units of measurement, pluralization rules, country flags (200+ countries), phone codes and input masks. Everything is built on top of the native Intl API, ensuring correctness in any market.

For browser state management — convenient wrappers over localStorage, sessionStorage, cookie, and URL hash. All with TypeScript types and change subscription support. Data persists across sessions without extra boilerplate on your end.

For SEO and meta tags — a unified class that synchronizes <title>, Open Graph, and Twitter Card simultaneously. A single setTitle() call updates the browser tab, social media previews, and Twitter card at once. Works in both browser and SSR environments.

For data manipulation — a rich set of utilities: deep object copying, array operations, safe type conversion, value validation, string formatting, and template substitution. Written with real edge cases in mind, not just the happy path.

For DOM — element creation, attribute handling, scrolling, querying, and image utilities. Small but essential tools that save time when working with the browser environment.

Installation

npm install @dxtmisha/functional-basic

Quick Start

import { Api, GeoIntl, Meta, Cache, isFilled } from '@dxtmisha/functional-basic'

// HTTP client
Api.setUrl('/api/v1')
const users = await Api.get({ path: 'users' })

// Locale-aware formatting
const intl = new GeoIntl()
intl.number(1234567.89)     // '1,234,567.89'
intl.currency(99.99, 'USD') // '$99.99'
intl.date(new Date(), 'date')

// Caching
const cache = new Cache()
const data = cache.get('key', () => expensiveOperation(), [dep])

// Unified SEO — one call updates title, og:title and twitter:title
const meta = new Meta()
meta.setSuffix('My Site')
meta.setTitle('Article').setDescription('...').setImage('https://...')

// Validation
if (isFilled(value)) { /* ... */ }

Principles

  • Zero external dependencies — no third-party packages are pulled in. Fewer conflicts, fewer vulnerabilities, fewer surprises during updates.
  • TypeScript-first — strict typing and autocomplete out of the box. Types aren't an "add-on" — they're an integral part of the API.
  • Clean API — method chaining, predictable behavior, clear naming. You don't need to read the docs to understand what isFilled or setTitle does.
  • Test coverage — every class and function ships with tests. Library changes won't silently break your project.

Documentation

Full API reference, examples, and guides:

📖 https://dxtmisha.github.io/dxt-ui/?path=/docs/dxtmisha-en-functional-basic-about-the-library--docs

Difference from @dxtmisha/functional

  • @dxtmisha/functional-basic — core utilities, no framework dependencies. Use this with vanilla JS, React, or any non-Vue stack, or when building a library.
  • @dxtmisha/functional — extends functional-basic with Vue 3 composables and reactive utilities. Use this in Vue / Nuxt applications.

License

MIT