New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hexlet/pairs

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hexlet/pairs

[![github action status](https://github.com/hexlet-components/js-pairs/workflows/Node%20CI/badge.svg)](https://github.com/hexlet-components/js-pairs/actions)

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
32
-53.62%
Maintainers
3
Weekly downloads
 
Created
Source

js-pairs

github action status

Install

npm install @hexlet/pairs

Usage example

import {
  cons, car, cdr, toString, isPair,
} from '@hexlet/pairs';

const pair = cons(3, 5);

isPair(pair); // true

car(pair); // 3
cdr(pair); // 5

toString(pair); // (3, 5)

TypeScript

Full type definitions ship with the package:

import { cons, car } from '@hexlet/pairs'
import type { Pair } from '@hexlet/pairs'

const pair: Pair<number, string> = cons(1, 'hexlet')
const left = car(pair) // type: number

For more information, see the Full Documentation

Development

  • npm test — run Vitest
  • npm run lint — ESLint (JS + TS)
  • npm run typecheck — strict TypeScript diagnostics
  • npm run build — emit ESM artifacts to dist/

Hexlet Ltd. logo

This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.

FAQs

Package last updated on 09 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts