Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamscott/pico8-missing-builtins
Provides Lua built-in functions to pico8.
https://github.com/adamscott/pico8-missing-builtins
Last synced: 11 days ago
JSON representation
Provides Lua built-in functions to pico8.
- Host: GitHub
- URL: https://github.com/adamscott/pico8-missing-builtins
- Owner: adamscott
- License: other
- Created: 2016-05-19T22:38:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-23T20:23:55.000Z (over 5 years ago)
- Last Synced: 2024-08-02T06:17:11.584Z (3 months ago)
- Language: Lua
- Homepage:
- Size: 56.6 KB
- Stars: 24
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-PICO-8 - pico8-missing-builtins - Provides Lua built-in functions to pico8. (Uncategorized / Uncategorized)
README
# pico8-missing-builtins
[![travis-ci](https://travis-ci.org/adamscott/pico8-missing-builtins.svg?branch=master)](https://travis-ci.org/adamscott/pico8-missing-builtins)
[![codecov](https://codecov.io/gh/adamscott/pico8-missing-builtins/branch/master/graph/badge.svg)](https://codecov.io/gh/adamscott/pico8-missing-builtins)You miss built-in lua functions such as `ipairs` or `getmetatable` in [pico-8](http://www.lexaloffle.com/pico-8.php)? Well, fear no more.
## Currently supported Lua "built-in" functions
- `getmetatable`
- `setmetatable`
- `rawget`
- `unpack`
- `ipairs`
- `table.pack`
- `table.unpack` as an alias to `unpack`
- `table.insert`
- `table.remove`
- `table.sort`### Tested to imitate their counterparts
Travis-CI is set to test `missing.lua` against `test.lua`, which compares results of this library functions with the built-in ones. Well, tests may be incomplete, so do not hesitate to [flag a bug to the issue tracker](https://github.com/adamscott/pico8-missing-builtins/issues) if something goes wrong.## How to use
Heads up to the [latest release.](https://github.com/adamscott/pico8-missing-builtins/releases/latest) Then, there's two options:
* Either you download `missing.lua` then copy the file contents into your `.p8` project file, preferably before the rest of your code; or
* you load `missing.p8` in pico-8 to test it out first.### About this license
This library is under creative commons license [CC4-BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/). See [LICENSE.md](LICENSE.md). It's the same license as the optional one on Lexaloffle's website if you choose to publish a cart.So, if you happen to publish a cart using this library, it would be nice if you mention it.
## Thanks
To Lexaloffle, which this library would not exist without pico-8.## Changes
### 0.2
- Add some `table` functions.
- `table.pack`
- `table.unpack` as an alias to `unpack`
- `table.insert`
- `table.remove`
- `table.sort`
- Refactor `ipairs` to make it return an `iter` function, as the native one does.### 0.1
- Add
- `getmetatable`
- `setmetatable`
- `rawget`
- `unpack`
- `ipairs`