public static EcmaValue Add([This] EcmaValue thisValue, EcmaValue value) { EcmaSet map = thisValue.GetUnderlyingObject <EcmaSet>(); map.Add(value); return(thisValue); }
protected virtual void WriteSet(EcmaSet set) { WriteObjectTag(set); WriteArrayLength(set.Size); WriteToken(InspectorTokenType.Space); WriteToken(InspectorTokenType.ObjectStart); set.ForEach((v, k) => { if (this.LastToken != InspectorTokenType.ObjectStart) { WriteToken(InspectorTokenType.EntrySeparator); } WriteValueOrObjectTag(v); }); WriteToken(InspectorTokenType.ObjectEnd); }
public static EcmaValue Clear([This] EcmaValue thisValue) { EcmaSet map = thisValue.GetUnderlyingObject <EcmaSet>(); map.Clear(); return(default);