Skip to content

A small NPM module to make Lua-style arrays that start at one.

License

Notifications You must be signed in to change notification settings

lewisakura/lua-style-arrays

Repository files navigation

lua-style-arrays CircleCI

NPM

A small NPM module with zero dependencies to make Lua-style arrays that start at one.

Usage

var convertToLuaStyle = require('lua-style-arrays');

var luaStyleArray = convertToLuaStyle(['this is', 'a lua-style array']);

console.log(luaStyleArray[1]);
// this is
console.log(luaStyleArray[0]);
// undefined