kjohnson/format-object-list
最新稳定版本:0.1.0
Composer 安装命令:
composer require kjohnson/format-object-list
包简介
Formats an associative array into a JS parsable array of objects.
README 文档
README
Formats an associative array into a JS parsable array of label/value objects.
Installation
composer require kjohnson/format-object-list
Usage
$data = [ 'foo' => 'bar' ]; $formatter = FormatObjectList\Factory::fromKeyValue( $data ); $list = $formatter->format(); // [ [ 'label' => 'bar', 'value' => 'foo' ] ]
$data = [ 'foo' => 'bar' ]; $formatter = FormatObjectList\Factory::fromValueKey( $data ); $list = $formatter->format(); // [ [ 'label' => 'foo', 'value' => 'bar' ] ]
统计信息
- 总下载量: 239.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-01-18