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

atlibx

v1.7.2

Published

![License](https://img.shields.io/npm/l/atlibx) ![Node Version](https://img.shields.io/node/v/atlibx) ![Coverage](https://img.shields.io/badge/coverage-99.7%25-brightgreen)

Readme

atlibx

License Node Version Coverage

atlibx adalah koleksi utilitas internal tanpa dependensi eksternal (zero-dependency) yang dirancang untuk performa dan penggunaan lintas service (backend & frontend).

Library ini mencakup modul untuk manipulasi array, kriptografi, geo-spatial, pemrosesan string, dan banyak lagi.

Installation

npm install atlibx
# atau
pnpm add atlibx
# atau
yarn add atlibx

Modules

1. Array Utilities

Modul untuk kompresi data JSON array of objects. Sangat berguna untuk mengurangi payload size API response.

Import:

import { flatten, unflatten } from 'atlibx/array'

Usage:

const users = [
	{ id: 1, name: 'Alice', role: 'admin' },
	{ id: 2, name: 'Bob', role: 'user' },
]

// 1. Flatten: Mengubah array of object menjadi struktur terkompresi
const compressed = flatten(['id', 'name', 'role'], users)

// 2. Unflatten: Mengembalikannya ke bentuk semula
const restored = unflatten(compressed)

2. Crypto Utilities (AES-GCM & Steganography)

Wrapper untuk enkripsi simetris AES-256-GCM dan utilitas steganografi berbasis Zero-Width Characters.

Import:

import { encrypt, decrypt, steganoEncode, steganoDecode } from 'atlibx/crypto'

Usage (AES):

const secret = 'my-super-secret-password-at-least-32-chars'
const { result: encrypted } = await encrypt('My Secret Message', secret)
const { result: decrypted } = await decrypt(encrypted, secret)

Usage (Steganography):

// Menyembunyikan teks rahasia di dalam teks publik secara invisible
const visible = 'This is a normal tweet.'
const hidden = 'Secret password'
const combined = steganoEncode(visible, hidden, 'seed-key')

const decoded = steganoDecode(combined, 'seed-key')
console.log(decoded.hiddenText) // "Secret password"

3. Map / Geo Utilities

Utilitas geografis untuk perhitungan arah dan encoding polyline.

Import:

import { calculateHeading, encodePolyline, decodePolyline, interpolateHeading } from 'atlibx/map'

Usage:

// 1. Calculate Heading (Bearing)
const heading = calculateHeading({
	previousCoordinate: { lat: -6.2, lng: 106.81 },
	currentCoordinate: { lat: -6.19, lng: 106.82 },
})

// 2. Polyline Encoding (Google Polyline Algorithm)
const encoded = encodePolyline([
	[lat1, lng1],
	[lat2, lng2],
])

4. String Utilities

Kumpulan fungsi sanitasi string berperforma tinggi.

Import:

import { sanitizeString, kebabLower, snakeLower } from 'atlibx/string'

Usage:

sanitizeString('  Hello   World! \u0000 ') // "Hello World!"
kebabLower('Hello World') // "hello-world"

5. Parser Utilities (Teltonika)

Parser protokol Teltonika (Codec 8 & 8 Extended) yang dioptimasi menggunakan Buffer.

Import:

import { TeltonikaParser } from 'atlibx/parser'

6. Object & Ensure Utilities

Sanitasi objek dan validasi tipe data dasar.

Import:

import { sanitizeObject, jsonSafeParse } from 'atlibx/object'
import { ensureFiniteNumber } from 'atlibx/ensure'

Usage:

sanitizeObject({ name: '  John  ', age: '25' }) // { name: 'John', age: 25 }
ensureFiniteNumber('123.45', 0) // 123.45

7. Regex Constants

Kumpulan regex yang sudah dikompilasi untuk berbagai kebutuhan pembersihan data.

Import:

import { whitespaceRegex, controlCharsRegex, urlWithVersionRegex } from 'atlibx/regex'

8. Common Utilities

Utilitas umum lainnya.

Import:

import { sleep } from 'atlibx/common'

Usage:

await sleep(1000) // Delay 1 second

9. Validator Utilities

Utilitas untuk validasi format data tipe tertentu.

Import:

import { isValidPasswordFormat, isRecord } from 'atlibx/validator'

Usage:

isValidPasswordFormat('SecureP@ssw0rd') // true
isRecord({ key: 'value' }) // true

Requirements

  • Node.js >= 22.0.0
  • ES Module Support

License

ISC