Skip to content
/ TArray Public

This class does array processing and then method chaining allows for smart coding like in Kotlin and similar languages.

Notifications You must be signed in to change notification settings

makicy/TArray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TArray

This class does array processing and then method chaining allows for smart coding like in Kotlin and similar languages.

Sample

$array = new TArray();
$array->set("name", "john");

// return "john"
$name = $array->find("name");
$array = new TArray();
$array->push(1);
$array->push(2);
$array->push(3);

// return 1
$number = $array->find(0);
$array = new TArray([1, 2, 3]);

// return [3, 2, 1]
$result = $array->valueDescend()->all();

// return [2, 4, 6]
$result = $array->map(fn (int $_, int $value) => $value*2)->all();

About

This class does array processing and then method chaining allows for smart coding like in Kotlin and similar languages.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages