ad-size

1.0.2 • Public • Published

adSize

Module extracts banner's size from html file

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

Installation

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

const adSize = require('ad-size');
 
let html = '<html><head><meta name="ad.size" content="HEIGHT=250px,width=970"></head><body></body></html>';
let size = adSize(html);
//=> '970x250'
 

Package Sidebar

Install

npm i ad-size

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.93 kB

Total Files

4

Last publish

Collaborators

  • tpkn