rss-parser
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -14,5 +14,14 @@ module.exports = function (grunt) { | ||
} | ||
} | ||
}, | ||
uglify: { | ||
dist: { | ||
files: { | ||
'./dist/rss-parser.min.js': ['./dist/rss-parser.js'] | ||
} | ||
} | ||
}, | ||
}); | ||
grunt.loadNpmTasks('grunt-browserify'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.registerTask('build', ['browserify', 'uglify:dist']); | ||
} |
{ | ||
"name": "rss-parser", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"main": "index.js", | ||
@@ -13,3 +13,4 @@ "scripts": { | ||
"grunt": "^0.4.5", | ||
"grunt-browserify": "^4.0.1" | ||
"grunt-browserify": "^4.0.1", | ||
"grunt-contrib-uglify": "^2.2.0" | ||
}, | ||
@@ -16,0 +17,0 @@ "dependencies": { |
@@ -16,3 +16,6 @@ # rss-parser | ||
## Usage | ||
rss-parser exposes `parseURL()`, `parseString()`, and `parseFile()` functions. | ||
You can parse RSS from a URL, local file (NodeJS only), or a string. | ||
* `parseString(xml, callback)` | ||
* `parseFile(filename, callback)` | ||
* `parseURL(url, [options,] callback)` | ||
@@ -35,3 +38,3 @@ Check out the output format in [test/output/reddit.json](test/output/reddit.json) | ||
```html | ||
<script src="/bower_components/rss-parser/dist/rss-parser.js"></script> | ||
<script src="/bower_components/rss-parser/dist/rss-parser.min.js"></script> | ||
<script> | ||
@@ -47,2 +50,12 @@ RSSParser.parseURL('https://www.reddit.com/.rss', function(err, parsed) { | ||
### Redirects | ||
By default, `parseURL` will follow up to one redirect. You can change this | ||
with `options.maxRedirects`. | ||
```js | ||
parser.parseURL('https://reddit.com/.rss', {maxRedirects: 3}, function(err, parsed) { | ||
console.log(parsed.feed.title); | ||
}); | ||
``` | ||
## Contributing | ||
@@ -63,5 +76,5 @@ | ||
```bash | ||
grunt browserify | ||
npm version minor # or major/patch | ||
grunt build | ||
git commit -a -m "browserify" | ||
npm version minor # or major/patch | ||
npm publish | ||
@@ -68,0 +81,0 @@ git push --follow-tags |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1297150
29
16703
80
4
1
13
7