Skip to content

Commit 98b1de9

Browse files
committed
Reformatted leading whitespace to conform with the implied format.
1 parent 86816b8 commit 98b1de9

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

snippets/javascript.snippets

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -96,62 +96,61 @@ snippet cl
9696
console.log(${1});
9797
# return
9898
snippet ret
99-
return ${1:result}
99+
return ${1:result}
100100
# for (property in object ) { ... }
101101
snippet fori
102-
for (var ${1:prop} in ${2:Things}) {
103-
${3:$2[$1]}
104-
};
102+
for (var ${1:prop} in ${2:Things}) {
103+
${3:$2[$1]}
104+
};
105105
# hasOwnProperty
106106
snippet has
107-
hasOwnProperty(${1})
107+
hasOwnProperty(${1})
108108
# docstring
109109
snippet /**
110-
/**
111-
* ${1:description}
112-
*
113-
*/
110+
/**
111+
* ${1:description}
112+
*
113+
*/
114114
snippet @par
115-
@param {${1:type}} ${2:name} ${3:description}
115+
@param {${1:type}} ${2:name} ${3:description}
116116
snippet @ret
117-
@return {${1:type}} ${2:description}
118-
117+
@return {${1:type}} ${2:description}
119118
# JSON.parse
120119
snippet jsonp
121-
JSON.parse(${1:jstr});
120+
JSON.parse(${1:jstr});
122121
# JSON.stringify
123122
snippet jsons
124-
JSON.stringify(${1:object});
123+
JSON.stringify(${1:object});
125124
# self-defining function
126125
snippet sdf
127-
var ${1:function_name} = function (${2:argument}) {
128-
${3:// initial code ...}
126+
var ${1:function_name} = function (${2:argument}) {
127+
${3:// initial code ...}
129128

130-
$1 = function ($2) {
131-
${4:// main code}
132-
};
133-
}
129+
$1 = function ($2) {
130+
${4:// main code}
131+
};
132+
}
134133
# singleton
135134
snippet sing
136-
function ${1:Singleton} (${2:argument}) {
137-
// the cached instance
138-
var instance;
135+
function ${1:Singleton} (${2:argument}) {
136+
// the cached instance
137+
var instance;
139138

140-
// rewrite the constructor
141-
$1 = function $1($2) {
142-
return instance;
143-
};
144-
145-
// carry over the prototype properties
146-
$1.prototype = this;
139+
// rewrite the constructor
140+
$1 = function $1($2) {
141+
return instance;
142+
};
143+
144+
// carry over the prototype properties
145+
$1.prototype = this;
147146

148-
// the instance
149-
instance = new $1();
147+
// the instance
148+
instance = new $1();
150149

151-
// reset the constructor pointer
152-
instance.constructor = $1;
150+
// reset the constructor pointer
151+
instance.constructor = $1;
153152

154-
${3:// code ...}
153+
${3:// code ...}
155154

156-
return instance;
157-
}
155+
return instance;
156+
}

0 commit comments

Comments
 (0)