定制 locutusjs/locutus 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

locutusjs/locutus

最新稳定版本:v2.0.35

Composer 安装命令:

composer require locutusjs/locutus

包简介

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

README 文档

README

CI npm version Verified: PHP 8.3 Verified: Python 3.12

All your standard libraries will be assimilated into our JavaScript collective. Resistance is futile.

Welcome to Locutus, where the boundaries of coding languages blur. We're a dedicated collective developers on a mission to explore the possibilities of porting standard libraries from various programming language (Go, Ruby, PHP, C) to JavaScript. Our journey is one of discovery, innovation, and sometimes, delightful chaos.

From the complex to the quirky, we assimilate libraries with a spirit of curiosity and a penchant for experimentation. Our creations typically start as rainy Sunday afternoon puzzles, and end up ranging from groundbreaking functions that enhance the JavaScript ecosystem, to unique oddities that challenge the norms of coding.

As we navigate through this uncharted territory, we invite you to join us. Whether to contribute, learn, or simply marvel at the wonders of cross-language integration and portability, your presence on GitHub is valued.

Embark on this journey with us at locutus.io.

Use our creations at your own risk, and may they inspire you to push the boundaries of what's possible with JavaScript.

Table of contents

Install

yarn add locutus

Use

$ vim php.js
const sprintf = require('locutus/php/strings/sprintf')
const echo = require('locutus/php/strings/echo')
const effectiveness = 'futile'
echo(sprintf('Resistance is %s', effectiveness))
$ node php.js
Resistance is futile
$ vim go.js
const strings = require('locutus/golang/strings')
console.log(strings.Contains('Locutus', 'cut'))
$ node go.js
true

Development

Some guidelines and instructions can be found in CONTRIBUTING.md

Quick commands:

  • yarn check - format + lint + test
  • yarn test:parity - cross-language verification
  • yarn test - full test suite
  • yarn lint - Biome check
  • yarn fix:biome - auto-fix

License

MIT, except for src/php/bc/ and src/php/_helpers/_bc.js which are LGPL-2.1 (derived from PHP's bcmath/Libbcmath). See LICENSE for details.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3733
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3733
  • Watchers: 199
  • Forks: 1102
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-07