craftyjs/Crafty — pull request #845 by naturalist (2014-12-15 08:15:55+00:00)
Title: Remove anonymous function creation in "trigger"

Move common code to a private function, in main scope, where it will be compiled and reused in Crafty.trigger. This removes code repetition and (hopefully) increases performance by removing the creation of anon function when 2 or more entities are found.