introspected icon indicating copy to clipboard operation
introspected copied to clipboard

No notification about array element change

Open proto-n opened this issue 7 years ago • 3 comments

Hey!

I've discovered a bug - the library currently doesn't notice when you change an element of an array.

Test case:

const Introspected = require('introspected')

let arr = [{},2,3]
let changes = 0
let arr_intro = Introspected(arr, (value, path) => {
	changes += 1
})

console.log(changes)
arr_intro[0] = 3
console.log(changes)
arr_intro[2] = 4
console.log(changes)

Expected output:

1
2
3

Actual output:

1
1
1

Node version tested: v9.10.1

proto-n avatar Sep 14 '18 18:09 proto-n

gotta be honest with you, I'm not actively using, nor maintaining, this project so PR welcome, otherwise have a look at the project that was born right after this called https://github.com/GianlucaGuarini/icaro

WebReflection avatar Sep 17 '18 08:09 WebReflection

@WebReflection would you consider some donation to support this a bit more?

dy avatar Aug 02 '19 16:08 dy

Unfortunately I don't have time for this, and any one-off donation won't be likely able to cover the time, which I don't have, needed to work on this

WebReflection avatar Aug 08 '19 12:08 WebReflection