Skip to content

Commit

Permalink
Release 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmueller committed Feb 7, 2015
1 parent 4cf1897 commit d9d93aa
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

1.0.3 / 2015-02-07
==================

* add xray.prepare(str, fn) for custom 'title | uppercase' filters
* better spot for badges

1.0.2 / 2015-02-05
==================

Expand Down
37 changes: 36 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![x-ray](https://cldup.com/r-PhcugeZ0.svg)

## Introduction
## Introduction

[![img](https://gittask.com/lapwinglabs/x-ray.svg)](https://gittask.com/lapwinglabs/x-ray)

Expand Down Expand Up @@ -212,6 +212,41 @@ xray('http://github.com')
.delay(5000)
```

#### Xray#prepare(<string|object> str, <function> fn)

You can prepare the data that you scrape for output

```js
function uppercase(str) {
return str.toUpperCase();
}

xray('mat.io')
.prepare('uppercase', uppercase)
.select('title | uppercase')
.run(function(err, title) {
// title == MAT.IO
});
```

You can also pass in objects:

```js
var prepare = {
uppercase: function (str) {
return str.toUpperCase();
}
}

xray('mat.io')
.prepare(prepare)
.select('title | uppercase')
.run(function(err, title) {
// title == MAT.IO
});
```


#### Xray#format(<function> fn)

Specify a custom formatting function for each selected element.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "x-ray",
"version": "1.0.2",
"version": "1.0.3",
"description": "structure any website",
"keywords": [
"scraper",
Expand All @@ -27,4 +27,4 @@
"subs": "0.0.1"
},
"main": "index"
}
}

0 comments on commit d9d93aa

Please sign in to comment.