Skip to content
/ older Public

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

License

Notifications You must be signed in to change notification settings

catpea/older

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages