using Jint.Native; namespace Jint.Runtime { public static class Arguments { public static JsValue[] Empty = new JsValue[0]; public static JsValue[] From(params JsValue[] o) { return o; } /// /// Returns the arguments at the provided position or Undefined if not present /// /// /// The index of the parameter to return /// The value to return is the parameter is not provided /// public static JsValue At(this JsValue[] args, int index, JsValue undefinedValue) { return args.Length > index ? args[index] : undefinedValue; } public static JsValue At(this JsValue[] args, int index) { return At(args, index, Undefined.Instance); } } }