jswrap_array.h 1.2 KB

1234567891011121314151617181920212223
  1. /*
  2. * This file is part of Espruino, a JavaScript interpreter for Microcontrollers
  3. *
  4. * Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk>
  5. *
  6. * This Source Code Form is subject to the terms of the Mozilla Public
  7. * License, v. 2.0. If a copy of the MPL was not distributed with this
  8. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. *
  10. * ----------------------------------------------------------------------------
  11. * JavaScript methods for Arrays
  12. * ----------------------------------------------------------------------------
  13. */
  14. #include "jsvar.h"
  15. JsVar *jswrap_array_constructor(JsVar *args);
  16. bool jswrap_array_contains(JsVar *parent, JsVar *value);
  17. JsVar *jswrap_array_indexOf(JsVar *parent, JsVar *value);
  18. JsVar *jswrap_array_join(JsVar *parent, JsVar *filler);
  19. JsVar *jswrap_array_map(JsVar *parent, JsVar *funcVar, JsVar *thisVar);
  20. JsVar *jswrap_array_slice(JsVar *parent, JsVar *startVar, JsVar *endVar);
  21. JsVar *jswrap_array_splice(JsVar *parent, JsVarInt index, JsVar *howManyVar, JsVar *element1, JsVar *element2, JsVar *element3, JsVar *element4, JsVar *element5, JsVar *element6);
  22. void jswrap_array_forEach(JsVar *parent, JsVar *funcVar, JsVar *thisVar);