# 2ldcheck

> Check whether a domain (a string) is a second level domain

Latest version **0.0.6** (published 2021-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install 2ldcheck
pnpm add 2ldcheck
yarn add 2ldcheck
bun add 2ldcheck
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2021-12-13 |
| First published | 2017-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sander Huijsen |
| Maintainers | sandyman |

## Links

- npm: https://www.npmjs.com/package/2ldcheck
- Repository: https://github.com/Sandyman/2ldcheck
- Homepage: https://github.com/Sandyman/2ldcheck#readme
- Issues: https://github.com/Sandyman/2ldcheck/issues
- npm.io page: https://npm.io/package/2ldcheck

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3

## Recent versions

- 0.0.6 (latest) — 2021-12-13
- 0.0.5 — 2019-03-12
- 0.0.4 — 2019-03-12
- 0.0.3 — 2017-03-12
- 0.0.2 — 2017-03-10
- 0.0.1 — 2017-03-10

## README

# 2ldcheck

This module does a simple check to see whether a domain name, like some.site.com.au, is a second level domain. Second
level domains are of the form '\*.co.uk', or '\*.com.au'.

# Usage

## Install

`npm i 2ldcheck -S`

## Use

```javascript
const isSecondLevelDomain = require('2ldcheck');

console.log(isSecondLevelDomain('domain.co.nz'));   // prints true
console.log(isSecondLevelDomain('domain.com'));     // prints false
```

## Warning

This module is far from complete. Some 2LDs are still missing. Feel free to add them if you wan to. I'm happy to 
incorporate any changes. 

Use this module at your own risk.

---
_Source: https://npm.io/package/2ldcheck · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
