Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add removeType #75

Open
rom1504 opened this issue Aug 9, 2016 · 5 comments
Open

add removeType #75

rom1504 opened this issue Aug 9, 2016 · 5 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Aug 9, 2016

Implementation : proto.types[type]=undefined

@SuperOP535
Copy link
Contributor

Shouldn't it be delete proto.types[type]; to actually remove it from the types object

@rom1504
Copy link
Member Author

rom1504 commented Nov 13, 2018 via email

@SuperOP535
Copy link
Contributor

I don't have to, just wondering why you did = undefined;

@rom1504
Copy link
Member Author

rom1504 commented Nov 15, 2018 via email

@SuperOP535
Copy link
Contributor

const obj = {a: 1, b: 1};
obj.b = undefined;
console.log(obj.hasOwnProperty('b')); // true

delete obj.b;
console.log(obj.hasOwnProperty('b')); // false

Setting it to undefined doesn't actually remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants