https://github.com/abcnews/url2cmid
Utility function for extracting a CMID from a URL
https://github.com/abcnews/url2cmid
library
Last synced: 5 months ago
JSON representation
Utility function for extracting a CMID from a URL
- Host: GitHub
- URL: https://github.com/abcnews/url2cmid
- Owner: abcnews
- License: mit
- Created: 2017-08-30T00:28:24.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T11:28:19.000Z (over 3 years ago)
- Last Synced: 2025-10-11T20:28:16.226Z (9 months ago)
- Topics: library
- Language: TypeScript
- Homepage:
- Size: 2.53 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# url2cmid
Extracts the ID from an ABC News URL.
## Usage
```
npm install @abcnews/url2cmid
```
And then…
```
import url2cmid from '@abcnews/url2cmid';
const cmid = url2cmid('http://www.abc.net.au/news/2017-06-09/quiz/8602590');
// returns '8602590'
```
## Development
This module is written in [typescript](https://www.typescriptlang.org/), uses [tsdx](https://tsdx.io/) for build/dev and [np](https://github.com/sindresorhus/np#readme) for deployment.