Module talk:IPAddress: Difference between revisions

Content deleted Content added
Reuse Module:IP: new section
Line 71:
:::Well, from the examples you wrote above, I'm suitably confident this will work {{smiley}}. I know the code in [[Module:IP]] is well-tested and since this function relies on that I'm sure this will work too; I wasn't familiar with the lua syntax for testing the success of other functions, but I'm quite confident that you are! Based on the tests I've done on the beta cluster the parameter I'll be passing in is exactly in the form that your function accepts. Anyway, I'm quite confident that this works for me! Best, '''[[User:L235|KevinL]]''' (<small>aka</small> [[User:L235|L235]] '''·''' [[User talk:L235#top|t]] '''·''' [[Special:Contribs/L235|c]]) 09:35, 14 December 2020 (UTC)
::::@[[User:L235|KevinL]]: OK, it's not rocket science so I updated the main module. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 09:55, 14 December 2020 (UTC)
 
== Reuse Module:IP ==
 
I'm proposing to reuse [[Module:IP]] for all functions in this module. The change can be found at [[Module:IPAddress/sandbox]]. This would have the following practical effects:
* Accept ranges for all functions. This is my intended use case. There's nothing in the testcases about this, so I'm not sure if current users are relying on isIp/isIpV4/isIpV6 returning false for ranges.
* Generally more lax parsing, such as accepting leading and trailing spaces.
What do you think about this change? If it's something that will break other templates, then I would propose to add new functions to check if a string is an IPv4 or IPv6 IP or range. [[User:MarioGom|MarioGom]] ([[User talk:MarioGom|talk]]) 18:28, 18 March 2021 (UTC)