-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext7.json
More file actions
22 lines (22 loc) · 2.21 KB
/
Copy pathcontext7.json
File metadata and controls
22 lines (22 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"url": "https://context7.com/checkthatphone/checkthatphone-node",
"public_key": "pk_myACxfWPzrWxBwYpxwudD",
"projectTitle": "CheckThatPhone Node.js SDK",
"description": "Official Node.js client for the CheckThatPhone phone validation API: US and Canada carrier lookup, line type, portability, deliverability, GeoIP and timezone, TCPA litigator screening and a free state do-not-call scrub in one call.",
"excludeFolders": [
"src",
"test",
".github"
],
"rules": [
"Phone numbers must be US or Canadian: 10 digits, or 11 digits starting with 1. Strip formatting before calling client.lookup(); anything else is rejected with HTTP 400 and costs nothing.",
"Keep the API key server-side, e.g. new CheckThatPhone(process.env.CHECKTHATPHONE_API_KEY). Never call the API from browser code.",
"Every value in result.data is a string: compare with 'true' / 'false' (result.data.deliverable === 'true'), never with booleans.",
"Use result.data.action and result.data.deliverable as the recommendation for a number. Do not re-derive deliverability from raw carrier fields.",
"Pass options.ip (the contact's IP address) whenever you have it: it upgrades location to city level and sets an IANA timezone (result.data.timezone) at no extra credit. Without it, location falls back to the area code.",
"Add-ons are opt-in flags on the options object: litigatorFilter costs +1 credit per lookup, landlineSmsLookup costs +1 credit only when the number is a landline, dncState (state do-not-call registries) and dncComplainer (national complainer list) are free. Enable only the add-ons you read. dncOther is a deprecated alias for both DNC checks.",
"With dncState, read result.data.dncStateChecked before dncStateResult: both are absent for the 12 states with no registry data (not checked, never clear), and 'error' means the check could not complete.",
"Catch CheckThatPhoneError and check err.retryable before retrying; a 429 means the per-minute rate limit was hit, so back off. Failed and invalid requests cost 0 credits.",
"One lookup costs one credit plus any add-ons (result.creditsUsed). The free tier is 500 lookups per month and hard-capped, so cache results if you re-check the same numbers often."
]
}