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

jlang

v1.0.1

Published

jlang - A modern JavaScript utility library inspired by PHP, Python, providing handy functions like isset(), isArray(), and other missing utilities in native JavaScript.

Readme

jlang — JavaScript Utility Library

A modern JavaScript utility library inspired by PHP and Python, providing essential helper functions that are missing from native JavaScript. Perfect for developers who miss the simplicity of isset(), empty(), and other utility functions.

Features

  • Zero dependencies - Pure JavaScript, no bloat
  • CommonJS compatible - Works in Node.js environments
  • PHP-inspired - Familiar functions you already know and love
  • Modular design - Import only what you need
  • Multiple naming conventions - Both camelCase and PascalCase variants available

Installation

npm install jlang

Quick Start

const { isset, isEmpty, isArray, toJson,fromJson } = require('jlang');

// Check if variable exists (like PHP's isset)
if (isset(variable)) {
  console.log('Variable exists!');
}

// Check if value is empty
if (isEmpty(data)) {
  console.log('Data is empty');
}

// Check if value is an array
if (isArray(myList)) {
  console.log('It\'s an array!');
}

// JSON utilities
const jsonString = toJson({ name: 'John' });
const parsed = fromJson(jsonString);

🧩 Modules et méthodes

📌 is — vérifications simples

📍 Ce module contient des méthodes pour tester des valeurs.

| Méthode | Description | Natifs JS existants | | ----------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | | isset(value) | Vérifie que la valeur n’est ni null ni undefined. | ✘ (JS utilise typeof … !== 'undefined' && value !== null) (Stack Overflow) | | isEmpty(value) | Vérifie si une valeur est “vide” (string vide, array vide, object sans clés). | ✘ | | isArray(value) | Vérifie si c’est un Array. | Existe : Array.isArray() ([MDN Web Docs][3]) | | string(value) | Vérifie si c’est une String. - en développement | ✘ | | isAlpha(str) | Vérifie si tous les caractères sont alphabétiques, comme ctype_alpha de PHP. | ✘ (disponibles dans locutus/php/ctype) ([Locutus][4]) | | hasAlpha(str) | Vérifie si la chaine contient au moins un caractère alphabétique, comme ctype_alpha de PHP. | ✘ (disponibles dans locutus/php/ctype) ([Locutus][4]) |


🚀 Exemple d’utilisation

import { is } from './index.js';


if (is.isset(userInput) && Is.array(data)) {
  console.log('Valid array:', data);
}

import { isset,isArray } from './index.js';
if (isset(userInput) && isArray(data)) {
  console.log('Valid array:', data);
}


📌 Règles de contribution

  1. Avant d’ajouter une méthode, vérifie si elle :

    • Existe déjà dans JS natif.
    • Est fournie par une bibliothèque utilitaire reconnue (ex. Lodash, utilities‑js) ([IronPDF][6]).
  2. Chaque méthode doit être testée (tests unitaires).

  3. Respecter les conventions de nommage et structure modulaire.

  4. Les méthodes doivent être pures (sans side‑effects) autant que possible.

  5. Documenter chaque nouvelle méthode dans le README.


🧪 Tests

Ajouter des tests dans un dossier tests/ avec un runner comme Jest ou Vitest. Couvre :

  • Cas normaux
  • Cas limites (null, undefined, chaînes vides, tableaux vides, etc.)

📜 Licence

Ce projet est sous licence MIT — contributions bienvenues.


[3]: https://locutus.io/php/ctype/ctype_alpha/"PHP's ctype_alpha in JavaScript | Locutus" [4]: https://www.condorinformatique.com/manuali/CourseJavaScript.pdf "ÉLÉMENTS DE JAVASCRIPT" [5]: https://ironpdf.com/fr/nodejs/blog/node-help/lodash-npm/ "Lodash NPM (Comment ça marche pour les développeurs)"