diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-04 01:08:27 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-04 01:08:27 +0100 |
commit | 314ce335b9a3f23224237f829c9b166eeb345187 (patch) | |
tree | 300927642fc0f857d9ea96ab4b1e2bc2d4c20950 /tools/migration/migrator/mtools.lua | |
parent | c534c1414eec471209c54a917152593da3198c90 (diff) | |
parent | 0f6de0b8f9c41090298ca0b3f998832971ff51b2 (diff) | |
download | prosody-314ce335b9a3f23224237f829c9b166eeb345187.tar.gz prosody-314ce335b9a3f23224237f829c9b166eeb345187.zip |
Merge 0.10->trunk
Diffstat (limited to 'tools/migration/migrator/mtools.lua')
-rw-r--r-- | tools/migration/migrator/mtools.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/migration/migrator/mtools.lua b/tools/migration/migrator/mtools.lua index e7b774bb..cfbfcce8 100644 --- a/tools/migration/migrator/mtools.lua +++ b/tools/migration/migrator/mtools.lua @@ -4,9 +4,8 @@ local print = print; local t_insert = table.insert; local t_sort = table.sort; -module "mtools" -function sorted(params) +local function sorted(params) local reader = params.reader; -- iterator to get items from local sorter = params.sorter; -- sorting function @@ -28,7 +27,7 @@ function sorted(params) end -function merged(reader, merger) +local function merged(reader, merger) local item1 = reader(); local merged = { item1 }; @@ -53,4 +52,7 @@ function merged(reader, merger) end -return _M; +return { + sorted = sorted; + merged = merged; +} |