beautify_js
This commit is contained in:
parent
0febe4f5fd
commit
5c2f32e184
208 changed files with 3891 additions and 1474 deletions
|
@ -1,11 +1,11 @@
|
|||
function isNumeric(n) {
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n)
|
||||
}
|
||||
|
||||
function multiplyNumeric(obj) {
|
||||
for(var key in obj) {
|
||||
if (isNumeric( obj[key] )) {
|
||||
for (var key in obj) {
|
||||
if (isNumeric(obj[key])) {
|
||||
obj[key] *= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
function isNumeric(n) {
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ describe("multiplyNumeric", function() {
|
|||
title: "Моё меню"
|
||||
};
|
||||
multiplyNumeric(menu);
|
||||
assert.equal( menu.width, 400 );
|
||||
assert.equal( menu.height, 600 );
|
||||
assert.equal( menu.title, "Моё меню" );
|
||||
assert.equal(menu.width, 400);
|
||||
assert.equal(menu.height, 600);
|
||||
assert.equal(menu.title, "Моё меню");
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue