Skip to content

Instantly share code, notes, and snippets.

@alfredobarron
Last active May 29, 2019 04:14
Show Gist options
  • Save alfredobarron/674c4aa5e9e9cf517ed25735755afdcf to your computer and use it in GitHub Desktop.
Save alfredobarron/674c4aa5e9e9cf517ed25735755afdcf to your computer and use it in GitHub Desktop.
// Delete object
delete obj.item;
// Get index array|object
var index = obj.indexOf(item);
// is object
typeof obj === 'object'
// object length
Object.keys(obj).length > 0
// push object
array_push($array, (object)['usuario'=>109, 'orden'=>1]);
// Delete item of array
array.splice(index, array.length);
array.splice(index, 1);
// forEach break
[1,2,3,4,5].some(function (v, k) {
if (k == 2) return false;
});
// clone
this.orders = [orders]
this.editOrder = Object.assign({}, order)
// set value
// this.$set(this.editOrder, index, index)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment