# locutusjs/locutus

Bringing stdlibs of other programming languages to TypeScript for fun

Repository: https://github.com/locutusjs/locutus
Canonical: https://ross.abutalabs.com/products/locutus
Homepage: https://locutus.io
Language: TypeScript
License: NOASSERTION
License Family: other
Topics: javascript, ports, programming-language, stdlib, typescript
Last push: 2026-05-16T10:46:56+00:00

## Health v2 (maintenance only)
Score: 82/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 82, release rhythm 72, longevity 100
- inputs: {"age_days": 6208, "days_push": 109, "days_rel": 109, "gap_med": 0.0, "n_releases_24m": 75}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3763, forks 1085 (observed 2026-08-28T04:08:17.974405+00:00)

## What it is
Locutus is a collection of ~800 TypeScript implementations of standard library functions from 18 programming languages such as PHP, Go, Python, Ruby, and C. Each function is individually importable and tree-shakeable via npm, porting function semantics rather than foreign runtime data structures.

## Use cases
- use php sprintf in javascript
- port a go strings.Contains call to typescript
- match behavior of another language's stdlib function in js
- learn how different languages implement the same functions
- import a single stdlib function with minimal bundle size
- migrate code from php or python to javascript

## When to choose
- you need parity with a specific function from PHP, Go, Python, Ruby, or another ported language
- you want a single tree-shakeable function rather than a full utility framework
- you are studying or teaching how other languages' standard libraries work

## When to avoid
- you need a general-purpose utility toolkit for TypeScript (use lodash instead)
- your target JavaScript environments already provide the functionality natively
- you need foreign language data structures or runtime objects, not just function behavior

## Facets
- artifact type: library
- maturity: active
- function: sdk, developer-tools
- domain: programming-languages, developer-tools, cross-platform
- platform: browser, cross-platform
- tags: stdlib-ports, tree-shakeable, php, golang, python, ruby, perl, lua, typescript, nodejs

## Member repositories
- locutusjs/locutus (main) score 82

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:17.974405+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:28:38.123830+00:00, confidence not recorded.
  - readme: https://github.com/locutusjs/locutus (fetched 2026-08-28T04:08:17.974405+00:00, sha a00385aa5ef9)
  - homepage: https://locutus.io (fetched 2026-08-29T09:23:08.456607+00:00, sha 1824ab474649)
  - registry_npm: https://registry.npmjs.org/locutus (fetched 2026-08-29T09:23:08.465776+00:00, sha 20f903ff12a4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
