File tree Expand file tree Collapse file tree 3 files changed +155
-83
lines changed
metascraper/__snapshots__ Expand file tree Collapse file tree 3 files changed +155
-83
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,7 @@ const { isString } = require('lodash')
5
5
6
6
const wrap = rule => ( { htmlDom } ) => {
7
7
const value = rule ( htmlDom )
8
-
9
- if ( ! isString ( value ) ) return
10
- return titleize ( value )
8
+ return isString ( value ) && titleize ( value )
11
9
}
12
10
13
11
module . exports = ( ) => ( {
Original file line number Diff line number Diff line change 1
- # metascraper-title
1
+ # metascraper-url
2
2
3
- [ ![ npm] ( https://img.shields.io/npm/v/metascraper-title .svg?style=flat-square )] ( https://www.npmjs.com/package/metascraper-title )
4
- [ ![ Dependency Status] ( https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-title &style=flat-square )] ( https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-title )
3
+ [ ![ npm] ( https://img.shields.io/npm/v/metascraper-url .svg?style=flat-square )] ( https://www.npmjs.com/package/metascraper-url )
4
+ [ ![ Dependency Status] ( https://david-dm.org/microlinkhq/metascraper.svg?path=packages/metascraper-url &style=flat-square )] ( https://david-dm.org/microlinkhq/metascraper?path=packages/metascraper-url )
5
5
6
6
> Get url property from HTML markup.
7
7
8
8
## Install
9
9
10
10
``` bash
11
- $ npm install metascraper-title --save
11
+ $ npm install metascraper-url --save
12
12
```
13
13
14
14
## License
15
15
16
- ** metascraper-title ** © [ microlink.io] ( https://microlink.io ) , Released under the [ MIT] ( https://github.com/microlinkhq/metascraper-title /blob/master/LICENSE.md ) License.<br >
17
- Authored and maintained by microlink.io with help from [ contributors] ( https://github.com/microlinkhq/metascraper-title /contributors ) .
16
+ ** metascraper-url ** © [ microlink.io] ( https://microlink.io ) , Released under the [ MIT] ( https://github.com/microlinkhq/metascraper-url /blob/master/LICENSE.md ) License.<br >
17
+ Authored and maintained by microlink.io with help from [ contributors] ( https://github.com/microlinkhq/metascraper-url /contributors ) .
18
18
19
19
> [ microlink.io] ( https://microlink.io ) · GitHub [ @microlink .io] ( https://github.com/microlinkhq ) · Twitter [ @microlinkhq ] ( https://twitter.com/microlinkhq )
You can’t perform that action at this time.
0 commit comments