View source for Module:JCW
MyWikiBiz, Author Your Legacy — Wednesday January 22, 2025
Jump to navigationJump to searchYou do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
local mArguments = require('Module:Arguments')
local TableTools = require('Module:TableTools')
local function stripToNil(text)
-- If text is a non-empty string, return its trimmed content.
-- Otherwise, return nothing (text is an empty string or is not a string).
if type(text) == 'string' then
return text:match('(%S.-)%s*$')
end
end
local function getDoiArgs(args)
-- Return a list of |doiN=xxx parameter values, omitting blanks and skipped N's.
-- LATER Should expand this to work with each exported function.
local indices = {}
for k, v in pairs(args) do
if stripToNil(v) and type(k) == 'string' then
local n = tonumber(k:match('^doi(%d+)$'))
if n then
table.insert(indices, n)
000
1:0
Template used on this page:
Return to Module:JCW.