Skip to content

Commit 8fd208b

Browse files
committed
Add IIFE snippet
I'm using this snippet quite often so I figured it might be useful in the general snippet library for this package.
1 parent 70b1428 commit 8fd208b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

snippets/language-javascript.cson

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
'if':
4545
'prefix': 'if'
4646
'body': 'if (${1:true}) {\n\t$2\n}'
47+
'Immediately-Invoked Function Expression':
48+
'prefix': 'iife'
49+
'body': '(function() {\n${1:\t"use strict";\n}\t$2\n}());'
4750
'log':
4851
'prefix': 'log'
4952
'body': 'console.log($1);$0'

0 commit comments

Comments
 (0)