Skip to content

Comment on Underscore.phpparent

Comments

Just copying this from the docs, but you can pass an array of functions to mixin:

  __::mixin(array(
    'capitalize'=> function($string) { return ucwords($string); }
  ));
  __::capitalize('moe'); // 'Moe'
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.