Beispiel #1
0
        public static EcmaValue Add([This] EcmaValue thisValue, EcmaValue value)
        {
            EcmaSet map = thisValue.GetUnderlyingObject <EcmaSet>();

            map.Add(value);
            return(thisValue);
        }
Beispiel #2
0
 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);
 }
Beispiel #3
0
        public static EcmaValue Clear([This] EcmaValue thisValue)
        {
            EcmaSet map = thisValue.GetUnderlyingObject <EcmaSet>();

            map.Clear();
            return(default);