laracasts/PHP-Vars-To-Js-Transformer — pull request #5 by spamoom (2014-03-04 17:02:50+00:00)
Title: Handing null and zero values

Passing in 0 would cause the JS to render in a way that breaks further processing (especially if scripts are under the echo)

``

I've first added a transform to catch null values and return the correct JS. I have also wrapped each return in an array so that null and zero values are correctly picked up as "processed". Was tempted to break it out into a different class but seemed over-kill.