* zin: add js helper function to create js instance.

This commit is contained in:
sunhao
2024-01-19 16:57:10 +08:00
parent 3eb6982d54
commit 30a3d002c1
+13
View File
@@ -439,3 +439,16 @@ class js extends directive
return $context->call(...$args);
}
}
/**
* Create js object.
* 创建 JS 对象。
*
* @access public
* @param null|string|js|array ...$codes Codes.
* @return js
*/
function js(null|string|js|array ...$codes): js
{
return new js(...$codes);
}