Skip to content

ryanplusplus/switch.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

switch.lua

Lua implementation of a switch statement. Supports an optional default case.

Example

local switch = require 'switch'

switch('lua', {
  goodbye = function(value)
    ...
  end,
  hello = function(value)
    ...
  end,
  [switch.default] = function(value)
    ...
  end
})

About

Lua implementation of a switch statement

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages