UNPKG

get-apex-domain

Version:

Returns the apex domain (aka base, bare, naked, root apex, or zone apex domain) of the current web page without the use of a public suffix list. The apex domain is also the top-most domain that allows for setting cookies.

74 lines (73 loc) 1.92 kB
{ "name": "get-apex-domain", "version": "1.1.0", "description": "Returns the apex domain (aka base, bare, naked, root apex, or zone apex domain) of the current web page without the use of a public suffix list. The apex domain is also the top-most domain that allows for setting cookies.", "author": "Aaron Hardy", "contributors": [ "Joe Khoury" ], "repository": { "type": "git", "url": "git@github.com:Aaronius/get-apex-domain.git" }, "keywords": [ "apex", "domain", "base", "naked", "root", "zone", "hostname", "url", "cookie" ], "license": "MIT", "module": "src/index.js", "main": "lib/index.js", "files": [ "src", "lib" ], "scripts": { "format": "prettier --write \"**/*.{json,js,md,eslintrc}\"", "lint": "eslint --fix .", "test": "jest", "test:watch": "jest --watchAll", "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", "test:coverage": "jest --coverage", "build": "babel ./src --out-dir ./lib", "prepublishOnly": "npm-run-all format lint test build" }, "husky": { "hooks": { "pre-commit": "echo 'Running pre-commit scripts...' && lint-staged", "pre-push": "echo 'Running pre-push scripts...' && npm run test" } }, "lint-staged": { "*.{json,js,md,eslintrc}": [ "prettier --write", "git add" ], "*.js": [ "eslint --fix", "git add" ] }, "devDependencies": { "@babel/cli": "^7.7.0", "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", "babel-jest": "^24.8.0", "babel-plugin-add-module-exports": "^1.0.2", "eslint": "^6.6.0", "eslint-config-prettier": "^6.6.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jest": "^23.0.4", "husky": "^3.0.9", "jest": "^24.8.0", "lint-staged": "^9.4.3", "npm-run-all": "^4.1.5", "prettier": "^1.19.1" } }