FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
language-javascript/snippets/language-javascript.cson at master · Ingramz/language-javascript · GitHub
Ingramz
/
language-javascript
Public
forked from
atom/language-javascript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
language-javascript
/
snippets
/
language-javascript.cson
Copy path
More file actions
More file actions
Latest commit
History
History
History
127 lines (127 loc) · 3.94 KB
Breadcrumbs
language-javascript
/
snippets
/
language-javascript.cson
Copy path
File metadata and controls
127 lines (127 loc) · 3.94 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
'
.source.js
'
:
'
Object Method
'
:
'
prefix
'
:
'
kf
'
'
body
'
:
'
${1:methodName}: function (${2:attribute}) {
\n\t
$3
\n
}${4:,}
'
'
Object key — key: "value"
'
:
'
prefix
'
:
'
kv
'
'
body
'
:
'
${1:key}: ${2:
\'
${3:value}
\'
}${4:, }
'
'
Prototype
'
:
'
prefix
'
:
'
proto
'
'
body
'
:
'
${1:ClassName}.prototype.${2:methodName} = function ($3) {
\n\t
$0
\n
};
'
'
do
'
:
'
prefix
'
:
'
do
'
'
body
'
:
'
do {
\n\t
$2
\n
} while (${1:true});
'
'
condition ? true : false
'
:
'
prefix
'
:
'
tern
'
'
body
'
:
'
${1:condition} ? ${2:true} : ${3:false}
'
'
if
'
:
'
prefix
'
:
'
if
'
'
body
'
:
'
if (${1:true}) {
\n\t
$2
\n
}
'
'
if … else
'
:
'
prefix
'
:
'
ife
'
'
body
'
:
'
if (${1:true}) {
\n\t
$2
\n
} else {
\n\t
$3
\n
}
'
'
else
'
:
'
prefix
'
:
'
else
'
'
body
'
:
'
else {
\n\t
$1
\n
}
'
'
else if
'
:
'
prefix
'
:
'
elseif
'
'
body
'
:
'
else if (${1:true}) {
\n\t
$2
\n
}
'
'
for
'
:
'
prefix
'
:
'
for
'
'
body
'
:
'
for (var ${2:i} = 0; ${2:i} < ${1:array}.length; ${2:i}++) {
\n\t
${1:array}[${2:i}]$3
\n
}
'
'
for in
'
:
'
prefix
'
:
'
forin
'
'
body
'
:
'
for (var ${1:variable} in ${2:object}) {
\n\t
${3:if (${2:object}.hasOwnProperty(${1:variable})) {
\n\t\t
$4
\n\t\\
}}
\n
}
'
'
for of
'
:
'
prefix
'
:
'
forof
'
'
body
'
:
'
for (${1:variable} of ${2:iterable}) {
\n\t
$3
\n
}
'
'
Function
'
:
'
prefix
'
:
'
fun
'
'
body
'
:
'
function ${1:functionName}($2) {
\n\t
$0
\n
}
'
'
Anonymous Function
'
:
'
prefix
'
:
'
f
'
'
body
'
:
'
function ($1) {
\n\t
$2
\n
}
'
'
Arrow Function
'
:
'
prefix
'
:
'
af
'
'
body
'
:
'
($1) => {
\n\t
$2
\n
}
'
'
Generator
'
:
'
prefix
'
:
'
gen
'
,
'
body
'
:
'
function* ${1:functionName}($2) {
\n\t
$0
\n
}
'
'
Anonymous Generator
'
:
'
prefix
'
:
'
g
'
'
body
'
:
'
function* ($1) {
\n\t
$2
\n
}
'
'
getElementsByClassName
'
:
'
prefix
'
:
'
get
'
'
body
'
:
'
getElementsByClassName(${1:
\'
${2:className}
\'
})$3
'
'
getElementsByName
'
:
'
prefix
'
:
'
getn
'
'
body
'
:
'
getElementsByName(${1:
\'
${2:name}
\'
})$3
'
'
getElementsByTagName
'
:
'
prefix
'
:
'
gett
'
'
body
'
:
'
getElementsByTagName(${1:
\'
${2:tagName}
\'
})$3
'
'
getElementById
'
:
'
prefix
'
:
'
geti
'
'
body
'
:
'
getElementById(${1:
\'
${2:id}
\'
})$3
'
'
querySelector
'
:
'
prefix
'
:
'
qs
'
'
body
'
:
'
querySelector(${1:
\'
${2:query}
\'
})$3
'
'
querySelectorAll
'
:
'
prefix
'
:
'
qsa
'
'
body
'
:
'
querySelectorAll(${1:
\'
${2:query}
\'
})$3
'
'
Immediately-Invoked Function Expression
'
:
'
prefix
'
:
'
iife
'
'
body
'
:
'
(function() {
\n\t
${1:
\'
use strict
\'
;
\n
}
\t
$2
\n
}());
'
'
log
'
:
'
prefix
'
:
'
log
'
'
body
'
:
'
console.log($1);$0
'
'
dir
'
:
'
prefix
'
:
'
dir
'
'
body
'
:
'
console.dir($1);$0
'
'
warn
'
:
'
prefix
'
:
'
warn
'
'
body
'
:
'
console.warn($1);$0
'
'
error
'
:
'
prefix
'
:
'
error
'
'
body
'
:
'
console.error($1);$0
'
'
inspect
'
:
'
prefix
'
:
'
inspect
'
'
body
'
:
'
console.log(require(
\'
util
\'
).inspect($0, { depth: null }));
'
'
new Promise
'
:
'
prefix
'
:
'
prom
'
'
body
'
:
'
new Promise(function(resolve, reject) {
\n\t
$1
\n
});$0
'
'
setInterval function
'
:
'
prefix
'
:
'
interval
'
'
body
'
:
'
setInterval(${2:function () {
\n\t
$3
\n\\
}}, ${1:10});
'
'
setTimeout function
'
:
'
prefix
'
:
'
timeout
'
'
body
'
:
'
setTimeout(${2:function () {
\n\t
$3
\n\\
}}, ${1:10});
'
'
switch
'
:
'
prefix
'
:
'
switch
'
'
body
'
:
'
switch (${1:expression}) {
\n\t
case ${2:expression}:
\n\t\t
$4
\n\t\t
break;$5
\n\t
default:
\n\t\t
$3
\n
}
'
'
case
'
:
'
prefix
'
:
'
case
'
'
body
'
:
'
case ${1:expression}:
\n\t
$2
\n\t
break;
'
'
try
'
:
'
prefix
'
:
'
try
'
'
body
'
:
'
try {
\n\t
$1
\n
} catch (${2:e}) {
\n\t
$3
\n
}${4: finally {
\n\t
$5
\n\\
}}
'
'
while
'
:
'
prefix
'
:
'
while
'
'
body
'
:
'
while (${1:true}) {
\n\t
$2
\n
}
'
'
Start Docblock
'
:
'
prefix
'
:
'
/**
'
'
body
'
:
'
/**
\n
* $1
\n
*/$0
'
'
CommonJS require
'
:
'
prefix
'
:
'
req
'
'
body
'
:
'
const ${1:module} = require(
\'
${1:module}
\'
);
'
'
Class
'
:
'
prefix
'
:
'
class
'
'
body
'
:
'
class ${1:ClassName} {
\n\t
constructor($2) {
\n\t\t
$3
\n\t
}
\n
}
'
'
export function
'
:
'
prefix
'
:
'
expfun
'
'
body
'
:
'
exports.${1:functionName} = function ($2) {
\n\t
${3:// body...}
\n
};
'
'
export module
'
:
'
prefix
'
:
'
expmod
'
'
body
'
:
'
module.exports = ${1:name};
'
'
return
'
:
'
prefix
'
:
'
ret
'
'
body
'
:
'
return $1;$0
'
Back
|
FazBrowse Home
|
New Git URL