strip-www

1.0.1 • Public • Published

strip-www NPM Version Build Status

Remove a "www" sub-domain.

Note: this version uses a regular expression which cannot be aware of what the top-level domain should be, which could have multiple segments. As a result, "www.co.uk", for example, will be erroneously shortened to "co.uk".

Installation

Node.js >= 4 is required. To install, type this at the command line:

npm install strip-www

Usage

const stripWWW = require('strip-www');

stripWWW('www.domain.com');
//-> domain.com

Package Sidebar

Install

npm i strip-www

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.67 kB

Total Files

4

Last publish

Collaborators

  • stevenvachon