Latest âś” | Latest âś” | Latest âś” | Latest âś” | Latest âś” |
var listArray = new ListArray();
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
let result = listArray.push(element);
result returns {uid: 1, name: 1, value: {name: "Edy", age: 27, country: "Brazil"}}
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.array = element;
result returns [{uid: 1, name: 1, value: {name: "Edy", age: 27, country: "Brazil"}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.duplicate(1);
result returns {uid: 2, name: 2, value: {name: "Edy", age: 27, country: "Brazil"}}
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
listArray.forEach((value, name, uid){
alert(`Value: ${value} | Name: ${name} | UID: ${uid}`);
});
NO returns
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.find((value) =>{
return value.name === "Edy";
});
result returns {'name': 'Edy', 'age': 27, 'country': 'Brazil'}
var listArrayBought = new ListArray("bought");
let elementBought = {'idBought': 1, 'idUser': 25};
listArrayBought.push(elementBought);
var listArrayUser = new ListArray("user");
let elementUser = {'id': 25, 'name': 'Marcus Vinicius', 'country': 'Brazil'};
listArrayUser.push(elementUser);
let bondBOUGHT_USER = listArrayBought.bond(listArrayUser, (bought, user) => {
return bought.idUser === user.id;
});
let result = bondBOUGHT_USER.array;
result returns [{uid: 1, name: 1, value: {bought: {value: {'idBought': 1, 'idUser': 25}}, user: [uid: 1, name: 1, value: {'id': 25, 'name': 'Marcus Vinicius', 'country': 'Brazil'}]}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
var listArrayCopy = new ListArray();
listArray.copyTo(1, listArrayCopy);
let result = listArrayCopy.array;
result returns [{'name': 'Edy', 'age': 27, 'country': 'Brazil'}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
var listArray2 = new ListArray();
let element2 = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray2.push(element2);
var listArray3 = new ListArray();
let element3 = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray3.push(element3);
let result = listArray.concat(listArray2,listArray3);
result returns [{uid: 1, name: 1, value: {'name': 'Edy', 'age': 27, 'country': 'Brazil'}},{uid: 2, name: 2, value: {'name': 'Edy', 'age': 27, 'country': 'Brazil'}},{uid: 3, name: 3, value: {'name': 'Edy', 'age': 27, 'country': 'Brazil'}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let newElement = {'name': 'Marcus', 'age': 28, 'country': 'Brazil'};
listArray.replace(1, newElement);
NO returns
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.getSize();
result returns 1
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.getByUID(1);
result returns [{uid: 1, name: 1, value: {name: "Edy", age: 27, country: "Brazil"}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.toString();
result returns "[{"uid":1,"name":1,"value":{"name":"Edy","age":27,"country":"Brazil"}}]"
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.toString(1);
result returns "{"name":"Edy","age":27,"country":"Brazil"}"
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.toJSON();
result returns [{uid: 1, name: 1, value: {name: "Edy", age: 27, country: "Brazil"}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.toJSON(1);
result returns {name: "Edy", age: 27, country: "Brazil"}
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
listArray.replaceNameValue(1, 'Register-1', newElement);
result returns [{uid: 1, name: "Register-1", value: {name: "Marcus", age: 28, country: "Brazil"}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element, "Register-1");
let result = listArray.getByName('Register-1');
result returns [{uid: 1, name: "Register-1", value: {'name': 'Edy', 'age': 27, 'country': 'Brazil'}}]
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.deleteUID(1);
result returns []
var listArray = new ListArray();
let element = {'name': 'Edy', 'age': 27, 'country': 'Brazil'};
listArray.push(element);
let result = listArray.clearAll();
result returns []