Skip to content

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

3 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages