summaryrefslogtreecommitdiff
path: root/User/foreachown-js.sublime-snippet
diff options
context:
space:
mode:
Diffstat (limited to 'User/foreachown-js.sublime-snippet')
-rw-r--r--User/foreachown-js.sublime-snippet11
1 files changed, 11 insertions, 0 deletions
diff --git a/User/foreachown-js.sublime-snippet b/User/foreachown-js.sublime-snippet
new file mode 100644
index 0000000..3049fed
--- /dev/null
+++ b/User/foreachown-js.sublime-snippet
@@ -0,0 +1,11 @@
+<snippet>
+ <content><![CDATA[
+for (${3:let} ${2:key} in ${1:obj}) if (${1:obj}.hasOwnProperty(${2:key})) {
+ ${5:${3:let} ${4:val} = ${1:obj}[${2:key}];}
+}
+]]></content>
+ <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
+ <tabTrigger>foreachown</tabTrigger>
+ <!-- Optional: Set a scope to limit where the snippet will trigger -->
+ <scope>source.js</scope>
+</snippet>