1.0.2 • Published 3 years ago

older v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

older

Simple function to check if a file is older, useful for cache related operations.

Installation

npm i older

Usage

import older from 'older';

Example

import older from 'older';

if(older('extracted.json', 'scraped.html')){ // if extracted.json is older than scraped.html

  // scraped html is newer and contains updated data, extracted.json must be re-created
  extractAndSaveData({from:'scraped.html', into:'extracted.json'});

}

Testing

npm run test
1.0.2

3 years ago

1.0.1

3 years ago