An open API service indexing awesome lists of open source software.

https://github.com/tpkn/ad-size

Module extracts banner's size from html file
https://github.com/tpkn/ad-size

Last synced: 3 months ago
JSON representation

Module extracts banner's size from html file

Awesome Lists containing this project

README

        

# adSize
Module extracts banner's size from html file

For now it's focuses on meta tag containing width and height.

## Installation
```bash
npm install ad-size
```

## API

### adSize(input[, silent])

### input
Type: _String_
Path to html file or it's content

### silent
Type: _Boolean_
Default: `true`
If `true`, then no errors would be thrown, and if an error occurs, the function returns `null`

## Usage

```javascript
const adSize = require('ad-size');

let html = '';
let size = adSize(html);
//=> '970x250'

```