Add isWord check to domains
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from './types';
|
||||
import axios from 'axios';
|
||||
import { filter, map, pipe } from 'ramda';
|
||||
import { IswordService } from 'src/isword/isword.service';
|
||||
|
||||
const parkIoEndpoints = {
|
||||
domains: 'https://park.io/domains.json',
|
||||
@@ -22,6 +23,10 @@ const parkIoEndpoints = {
|
||||
|
||||
@Injectable()
|
||||
export class ParkioService {
|
||||
constructor(
|
||||
private readonly isWordService: IswordService
|
||||
) {}
|
||||
|
||||
fetchDomainsForTld = async (tld: ParkioTld) => {};
|
||||
|
||||
fetchAllDomains = async (limit: number = 10_000): Promise<ParsedDomain[]> => {
|
||||
@@ -75,6 +80,7 @@ export class ParkioService {
|
||||
date_registered: domain.date_registered
|
||||
? this.parseDate(domain.date_registered)
|
||||
: undefined,
|
||||
is_word: this.isWordService.isWord(domainName)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -100,6 +106,7 @@ export class ParkioService {
|
||||
created: this.parseDate(auction.created),
|
||||
domain,
|
||||
domain_length: domain.length,
|
||||
is_word: this.isWordService.isWord(domain),
|
||||
tld,
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user