aboutsummaryrefslogtreecommitdiff
path: root/template/javascript/snip-es6-getter.js
diff options
context:
space:
mode:
Diffstat (limited to 'template/javascript/snip-es6-getter.js')
-rw-r--r--template/javascript/snip-es6-getter.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/template/javascript/snip-es6-getter.js b/template/javascript/snip-es6-getter.js
new file mode 100644
index 0000000..90f87a0
--- /dev/null
+++ b/template/javascript/snip-es6-getter.js
@@ -0,0 +1,5 @@
+{{_define_:var:"new".substitute('{{_name_}}', '\w\+', '\u\0', '')}}
+get {{_input_:name}}() {
+ return this._{{_var_:name}};
+}
+{{_cursor_}}