A pack of small, dependency-free PHP helper snippets for the
Tiger platform — a code module for the Code Area.
Install it, open the Code Area, read the source, and activate the helpers you want. Each becomes a global function available across your app.
slug($s)— URL-safe slughuman_bytes($n)—1.5 KB,3.2 MB, …time_ago($time)—"3 hours ago"ordinal($n)—1st,2nd,23rdinitials($name)—"John Doe"→"JD"array_get($arr, 'a.b.c', $default)— dot-path array read
Each file in snippets/ is self-describing:
<?php
// tiger:snippet label="Slugify" category="String" scope="global"
// description="slug($s): turn any string into a lowercase, URL-safe slug."
if (!function_exists('slug')) {
function slug(string $s, string $sep = '-'): string { /* … */ }
}The tiger:snippet header drives the Code Area listing; the body defines the helper (guarded
with function_exists so activating it can never fatally redeclare). No routes, no schema — just
code you opt into. See TIGER.md and the platform's CODE.md.
Add a snippets/<name>.php file with a tiger:snippet header + a function_exists-guarded
function. Keep it small, readable, and side-effect-free on load (define, don't do).
MIT — see LICENSE.