<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atitle%2Fexists</id>
	<title>Module:title/exists - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://linguifex.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3Atitle%2Fexists"/>
	<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:title/exists&amp;action=history"/>
	<updated>2026-04-05T18:14:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://linguifex.com/w/index.php?title=Module:title/exists&amp;diff=459871&amp;oldid=prev</id>
		<title>Sware: Created page with &quot;local title_is_title_module = &quot;Module:title/isTitle&quot; local title_new_title_module = &quot;Module:title/newTitle&quot;  local error = error local format = string.format local pcall = pcall local require = require local type = type  local at_limit  local function is_title(...) 	is_title = require(title_is_title_module) 	return is_title(...) end  local function new_title(...) 	new_title = require(title_new_title_module) 	return new_title(...) end  local function exists(title) 	return...&quot;</title>
		<link rel="alternate" type="text/html" href="https://linguifex.com/w/index.php?title=Module:title/exists&amp;diff=459871&amp;oldid=prev"/>
		<updated>2025-06-28T09:13:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;local title_is_title_module = &amp;quot;Module:title/isTitle&amp;quot; local title_new_title_module = &amp;quot;Module:title/newTitle&amp;quot;  local error = error local format = string.format local pcall = pcall local require = require local type = type  local at_limit  local function is_title(...) 	is_title = require(title_is_title_module) 	return is_title(...) end  local function new_title(...) 	new_title = require(title_new_title_module) 	return new_title(...) end  local function exists(title) 	return...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local title_is_title_module = &amp;quot;Module:title/isTitle&amp;quot;&lt;br /&gt;
local title_new_title_module = &amp;quot;Module:title/newTitle&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local error = error&lt;br /&gt;
local format = string.format&lt;br /&gt;
local pcall = pcall&lt;br /&gt;
local require = require&lt;br /&gt;
local type = type&lt;br /&gt;
&lt;br /&gt;
local at_limit&lt;br /&gt;
&lt;br /&gt;
local function is_title(...)&lt;br /&gt;
	is_title = require(title_is_title_module)&lt;br /&gt;
	return is_title(...)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function new_title(...)&lt;br /&gt;
	new_title = require(title_new_title_module)&lt;br /&gt;
	return new_title(...)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function exists(title)&lt;br /&gt;
	return title.exists&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[==[&lt;br /&gt;
Receives a title object or string, and returns {true} if the page for the input title exists, or {false} if not.&lt;br /&gt;
&lt;br /&gt;
By default, this function checks the {title.exists} key of the relevant title object, which increments the expensive function count. Normally, attempting to exceed the expensive function limit of 500 will result in an error being thrown, but this function will instead fall back to checking {title.content}, which does not increment the count. It is, however, considerably slower to check, and (unlike {title.exists}) will register as a page transclusion.&lt;br /&gt;
&lt;br /&gt;
The {force_transclusion} flag may be set to force the use of transclusion ({title.content}) in all instances, which can be used to avoid incrementing the expensive function count; this is sometimes useful when making a large number of checks, as hitting the expensive function limit can be disruptive to other modules or templates.]==]&lt;br /&gt;
return function(title, force_transclusion)&lt;br /&gt;
	local title_type = type(title)&lt;br /&gt;
	if title_type == &amp;quot;string&amp;quot; then&lt;br /&gt;
		title = new_title(title)&lt;br /&gt;
		-- If it&amp;#039;s an invalid string, return false.&lt;br /&gt;
		if not title then&lt;br /&gt;
			return false&lt;br /&gt;
		end&lt;br /&gt;
	elseif not is_title(title) then&lt;br /&gt;
		error(format(&amp;quot;bad argument #1 to &amp;#039;title/exists&amp;#039; (title object or string expected, got %s)&amp;quot;, title_type), 2)&lt;br /&gt;
	end&lt;br /&gt;
	if not (force_transclusion or at_limit) then&lt;br /&gt;
		local success, result = pcall(exists, title)&lt;br /&gt;
		if success then&lt;br /&gt;
			return result&lt;br /&gt;
		end&lt;br /&gt;
		at_limit = true&lt;br /&gt;
	end&lt;br /&gt;
	return title.content ~= false&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Sware</name></author>
	</entry>
</feed>