Skip to content

Instantly share code, notes, and snippets.

@scttnlsn
Created June 11, 2012 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scttnlsn/2911237 to your computer and use it in GitHub Desktop.
Save scttnlsn/2911237 to your computer and use it in GitHub Desktop.
ST2 Snippet: if (err) return callback(err)
<snippet>
<content><![CDATA[return ${1:callback} ${2:err} if ${2:err}?]]></content>
<tabTrigger>ifer</tabTrigger>
<scope>source.coffee</scope>
<description>ifer</description>
</snippet>
<snippet>
<content><![CDATA[if (${1:err}) return ${2:callback}(${1:err});]]></content>
<tabTrigger>ifer</tabTrigger>
<scope>source.js</scope>
<description>ifer</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment