Created
May 28, 2018 19:21
-
-
Save mikechambers/9a0eb0ff7bd035ebffe6d3109b3651ae to your computer and use it in GitHub Desktop.
JavaScript getter / setter Syntax Snippet for Atom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Just add to your Atom snippets file via the | |
//Menu : Atom -> Snippets | |
// | |
//To use, just type "get" in your .js file | |
//and git TAB | |
'.source.js': | |
'JavaScript Getter / Setter': | |
'prefix': 'get' | |
'body': """ | |
set name(value) { | |
this._name = value; | |
} | |
get name() { | |
return this._name; | |
} | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment