Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAMESERVER() should take a list #2847

Open
tlimoncelli opened this issue Feb 23, 2024 · 0 comments
Open

NAMESERVER() should take a list #2847

tlimoncelli opened this issue Feb 23, 2024 · 0 comments
Assignees

Comments

@tlimoncelli
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The NAMESERVER() function only takes a single item. It should take a list. Better yet, it should take a string or a list and do the right thing. Maybe using https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat ?

Describe the solution you'd like


var CF_NSLIST = [
    "alec.ns.cloudflare.com.",
    "ligia.ns.cloudflare.com.",
];

D("example.com", ...
    NAMESERVER(CF_NSLIST),
...

Describe alternatives you've considered

The work-around is to use this function.

// NAMESERVERS adds each item in nslist as a NAMESERVER().
// This is needed because NAMESERVER() takes a single item, not a list.
// (Previously this fn was named CF_NAMESERVERS)
function NAMESERVERS(nslist) {
    var nameserver_list = [];
    for (i = 0; i < nslist.length; i++) {
        nameserver_list.push(NAMESERVER(nslist[i]));
    }
    return nameserver_list
}

Additional context
Add any other context or screenshots about the feature request here.

@tlimoncelli tlimoncelli self-assigned this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant