UNPKG
es6-default-params
Version:
latest (0.4.3)
0.4.3
0.4.2
0.4.1
0.4.0
0.3.0
0.2.0
0.1.0
0.0.2
0.0.1
Function default parameters compiled to ES5.
github.com/square/es6-default-params
es6-default-params
/
test
/
examples
/
simple-function.js
7 lines
(5 loc)
•
84 B
JavaScript
View Raw
1
2
3
4
5
6
7
/* jshint esnext:
true
*/
function
foo
(x=5)
{
return
x; }
assert
.equal(foo(),
5
);