Get a notification when a file expires or changes.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
example.js
index.js
package.json

README.md

File expires

Get a notification when a file expires or changes.

Example

var createFileExpirer = require('./')

var file = createFileExpirer('https://github.com/favicon.ico')

var content

file.on('expires', function() {
  console.log('expired')
  file.readFile(function(err, c) {
    content = c
  })
})

file.on('change', function() {
  console.log('changed')
})


file.readFile(function(err, c) {
  content = c
})

Install

npm install file-expires

Licence

MIT