承接 briandavidclark/ramuda 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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>

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固