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

@mkgalaxy/ultimate-utils

v1.0.12

Published

A versatile npm package with TypeScript utilities, React components, and Parse Server integration. Works seamlessly with Next.js, React, and Node.js.

Readme

Ultimate Utils

A versatile npm package with TypeScript utilities, React components, and Parse Server integration. Works seamlessly with React, Next.js, and vanilla JavaScript/TypeScript projects.

Features

  • 🚀 TypeScript First: Fully typed for better DX
  • ⚛️ React Components: Ready-to-use components with Parse Server integration
  • 🔧 Utility Functions: Common utilities for everyday tasks
  • 🗄️ Parse Server Integration: Built-in Parse Server operations and hooks
  • 📦 Multiple Entry Points: Import only what you need
  • 🎯 Next.js Compatible: Works as client components in Next.js 13+

Installation

npm install @your-org/ultimate-utils
# or
yarn add @your-org/ultimate-utils
# or
pnpm add @your-org/ultimate-utils

Usage

1. Using Utility Functions (No React Required)

import { formatDate, debounce, isValidEmail } from '@your-org/ultimate-utils/utils';

// Format dates
const formatted = formatDate(new Date());

// Debounce functions
const debouncedSearch = debounce((query: string) => {
  console.log('Searching:', query);
}, 300);

// Validate email
const valid = isValidEmail('[email protected]');

2. Parse Server Setup (Node.js/React/Next.js)

Initialize Parse Server

// In your app initialization (e.g., _app.tsx for Next.js or App.tsx for React)
import { initializeParse } from '@your-org/ultimate-utils';

initializeParse({
  serverURL: 'https://your-parse-server.com/parse',
  appId: 'your-app-id',
  javascriptKey: 'your-javascript-key',
});

Using Parse Provider in React/Next.js

// app/layout.tsx (Next.js 13+) or App.tsx (React)
'use client';

import { ParseProvider } from '@your-org/ultimate-utils/react';

export default function RootLayout({ children }) {
  const parseConfig = {
    serverURL: process.env.NEXT_PUBLIC_PARSE_SERVER_URL!,
    appId: process.env.NEXT_PUBLIC_PARSE_APP_ID!,
    javascriptKey: process.env.NEXT_PUBLIC_PARSE_JS_KEY,
  };

  return (
    <html lang="en">
      <body>
        <ParseProvider config={parseConfig}>{children}</ParseProvider>
      </body>
    </html>
  );
}

3. Using React Components

Next.js 13+ (App Router)

'use client';

import { Button, Input, ParseDataFetcher } from '@your-org/ultimate-utils/react';

export default function MyPage() {
  return (
    <div>
      <Button variant="primary" onClick={() => alert('Clicked!')}>
        Click Me
      </Button>

      <Input label="Email" type="email" placeholder="Enter your email" />

      <ParseDataFetcher
        className="Post"
        options={{ limit: 10, descending: 'createdAt' }}
        renderData={(posts) => (
          <div>
            {posts.map((post) => (
              <div key={post.id}>
                <h3>{post.get('title')}</h3>
                <p>{post.get('content')}</p>
              </div>
            ))}
          </div>
        )}
      />
    </div>
  );
}

React (Create React App or Vite)

import { Button, Input } from '@your-org/ultimate-utils/react';

function App() {
  return (
    <div>
      <Button variant="secondary" size="large">
        My Button
      </Button>

      <Input label="Username" helperText="Enter your username" />
    </div>
  );
}

4. Using Parse Server Hooks

'use client';

import { useParseQuery, useParseMutation } from '@your-org/ultimate-utils/react';

function MyComponent() {
  // Fetch data
  const { data, loading, error, refetch } = useParseQuery('Post', {
    limit: 10,
    descending: 'createdAt',
  });

  // Mutate data
  const { mutate, remove } = useParseMutation('Post');

  const handleCreate = async () => {
    await mutate({ title: 'New Post', content: 'Content here' });
    refetch();
  };

  const handleDelete = async (id: string) => {
    await remove(id);
    refetch();
  };

  if (loading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return (
    <div>
      <button onClick={handleCreate}>Create Post</button>
      {data.map((post) => (
        <div key={post.id}>
          <h3>{post.get('title')}</h3>
          <button onClick={() => handleDelete(post.id)}>Delete</button>
        </div>
      ))}
    </div>
  );
}

5. Direct Parse Operations

import {
  fetchParseData,
  saveParseObject,
  deleteParseObject,
  getParseObjectById,
} from '@your-org/ultimate-utils';

// Fetch data
const posts = await fetchParseData('Post', {
  limit: 20,
  descending: 'createdAt',
});

// Create or update
const newPost = await saveParseObject('Post', {
  title: 'My Post',
  content: 'Post content',
});

// Get by ID
const post = await getParseObjectById('Post', 'postId123');

// Delete
await deleteParseObject('Post', 'postId123');

API Reference

Utilities

  • formatDate(date, locale?) - Format dates
  • debounce(func, wait) - Debounce function calls
  • deepClone(obj) - Deep clone objects
  • generateId() - Generate unique IDs
  • isValidEmail(email) - Validate email format
  • truncateText(text, maxLength) - Truncate text with ellipsis
  • sleep(ms) - Async sleep/wait
  • groupBy(array, key) - Group array by key

Parse Functions

  • initializeParse(config) - Initialize Parse Server
  • fetchParseData(className, options?) - Fetch data from Parse
  • saveParseObject(className, data, objectId?) - Create/update object
  • deleteParseObject(className, objectId) - Delete object
  • getParseObjectById(className, objectId, include?) - Get single object

React Hooks

  • useParseQuery(className, options?) - Fetch Parse data with React
  • useParseMutation(className) - Mutate Parse data
  • useParse() - Access Parse context

React Components

  • ParseProvider - Initialize Parse for React app
  • ParseDataFetcher - Generic data fetching component
  • Button - Reusable button component
  • Input - Reusable input component

Environment Variables

For Next.js projects, create a .env.local file:

NEXT_PUBLIC_PARSE_SERVER_URL=https://your-parse-server.com/parse
NEXT_PUBLIC_PARSE_APP_ID=your-app-id
NEXT_PUBLIC_PARSE_JS_KEY=your-javascript-key

TypeScript Support

This package is written in TypeScript and includes type definitions. No need for @types packages.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.