Сортировать массив алфавитно-цифровым методом localeCompare
.
Метод localeCompare () возвращает число, указывающее, идет ли строка ссылки до или после или совпадает с заданной строкой в порядке сортировки.
const sortAlphaNum = (a, b) => a.localeCompare(b, 'en', { numeric: true })
console.log([
"NFO:BANKNIFTY1931428900CE",
"NFO:BANKNIFTY1931429000CE",
"NFO:BANKNIFTY1931429500CE",
"NFO:BANKNIFTY1931429400CE",
"NFO:BANKNIFTY1931429300CE",
"NFO:BANKNIFTY1931429200CE"
].sort(sortAlphaNum))
For example, if you wanted to find all the links to Google's homepage, search for
link:http://www.google.com
So if you want to find all the inbound links, you can simply traverse your website's tree, and for each item it finds, build a URL. Then query Google for:
link:URL
And you'll get a collection of all the links that Google has from other websites into your website.
As for the legality of such harvesting, I'm sure it's not-exactly-legal to make a profit from it, but that's never stopped anyone before, has it?
(So I wouldn't bother wondering whether they did it or not. Just assume they do.)