do you mean something like this ? https://gist.github.com/yasoob/2c916d3cf099720b162a