CyrefJS
v1.38.6

CyrefJS

A modern, lightweight utility library for JavaScript and TypeScript.

npx @cyref/js
SCROLL
About

What is CyrefJS?

CyrefJS is a modern, lightweight utility library for JavaScript and TypeScript, built to make everyday development simpler, cleaner, and more productive.

Simple

Clean and intuitive utilities designed to keep your code simple and readable.

Fast

Lightweight utilities with minimal overhead, built for modern applications.

Flexible

Useful building blocks that fit naturally into different projects and workflows.

The difference

Write less. Build more.

CyrefJS provides small, focused utilities that help you replace repetitive code with clean and readable solutions.

Before
const chunks: number[][] = [];

for (let i = 0; i < numbers.length; i += 3) {
  chunks.push(numbers.slice(i, i + 3));
}
With CyrefJS
import { chunk } from "@cyref/js";

const chunks = chunk(numbers, 3);
Utilities

Small tools. Big impact.

A focused collection of lightweight utilities designed to make everyday JavaScript and TypeScript development simpler.

Array

Practical utilities for working with arrays and collections.

#chunk()#compact()#flatten()#unique()

String

Simple tools for transforming, formatting, and working with strings.

#capitalize()#camelCase()#truncate()#slugify()

Object

Useful helpers for reading, transforming, and managing objects.

#pick()#omit()#get()#set()

Number

Small utilities for calculations, ranges, and numeric operations.

#clamp()#randomInt()#roundTo()#lerp()

Date

Convenient helpers for working with dates and time.

#isDate()#addDays()#isBefore()#isAfter()

Function

Performance-focused utilities for controlling function execution.

#debounce()#throttle()#once()#memoize()

Type

Clear and reusable helpers for common JavaScript type checks.

#isString()#isNumber()#isArray()#isObject()

URL

Utilities for parsing, building, and working with URLs.

#parseQuery()#buildQuery()#getQueryParam()#setQueryParam()

Validation

Practical helpers for validating common values and formats.

#isEmail()#isURL()#isInteger()#isPositive()
Focused utilities with a simple API and zero runtime dependencies.
Quick Start

Start building in seconds.

Install CyrefJS, import the utilities you need, and start writing cleaner JavaScript and TypeScript.

01

Install CyrefJS

Add the package to your project with a single command.

terminal
$ npm install @cyref/js
02

Use your first utility

Import a utility and use it wherever you need it.

example.ts
import { chunk } from "@cyref/js";const numbers = [1, 2, 3, 4, 5, 6, 7];const result = chunk(numbers, 3);console.log(result);
output
[
  [1, 2, 3],
  [4, 5, 6],
  [7]
]
Ready to build?

Build cleaner JavaScript.

Start using focused, lightweight utilities designed to make everyday development simpler and more enjoyable.