-
Notifications
You must be signed in to change notification settings - Fork 18
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
Comments
Shouldn't it be |
why do you need to remove a type ?
…On Mon, Nov 12, 2018 at 10:46 AM SuperOP535 ***@***.***> wrote:
Shouldn't it be delete proto.types[type]; to actually remove it from the
types object
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPN_uwdoSEdQEZcfPrnivM1MuhqSM5wks5uuUOAgaJpZM4JgJu4>
.
|
I don't have to, just wondering why you did = undefined; |
Ah, that's equivalent to remove in js.
…On Thu, Nov 15, 2018, 11:18 SuperOP535 ***@***.***> wrote:
I don't have to, just wondering why you did = undefined;
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACPN_mbECdMLIIN-bIIWrTTRNi6WBublks5uvT9rgaJpZM4JgJu4>
.
|
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
Implementation :
proto.types[type]=undefined
The text was updated successfully, but these errors were encountered: