briandavidclark/ramuda
Composer 安装命令:
composer require briandavidclark/ramuda
包简介
Functional programming helper library for PHP based on Ramda.js
关键字:
README 文档
README
Functional programming helper library for PHP based on Ramda.js
As far as I know, this is the most feature complete port of Ramda.js for PHP with over 350 functions. Also, includes many functions from Ramda Adjunct and Ramda Extension.
In addition, where possible, some of the functions have improved capabilities, such as filter and map handling strings and objects as well as the usual arrays.
Requires PHP 5.6 or higher.
Usage example:
use ramuda\R; $users = [ ['id'=>'45', 'fName'=>'Jane', 'lName'=>'Doe'], ['id'=>'22', 'fName'=>'John', 'lName'=>'Doe'], ['id'=>'99', 'fName'=>'John', 'lName'=>'Smith'] ]; $listToSelect = R::pipe( R::filter(R::propEq('lName', 'Doe')), R::sortBy(R::prop('id')), R::map(function($x){ return "<option value='{$x['id']}'>{$x['fName']} {$x['lName']}</option>"; }), R::join(''), R::wrapWith(['<select>', '</select>']) ); echo $listToSelect($users);
Produces the following string:
<select> <option value="22">John Doe</option> <option value="45">Jane Doe</option> </select>
briandavidclark/ramuda 适用场景与选型建议
briandavidclark/ramuda 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 42 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 12 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「JS」 「utility」 「functional」 「curry」 「Clojure」 「functional programming」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 briandavidclark/ramuda 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 briandavidclark/ramuda 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 briandavidclark/ramuda 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Non-standard PHP library (NSPL) - functional primitives toolbox and more
Connection 'Db' codeception module to 'Yii2' module database settings
Auto-curried function library
Functional library for php with proper currying
Iteration tools for PHP
A collection of enhancements and utilities for the Silverstripe UserForms module
统计信息
- 总下载量: 42
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-01