New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

last-run

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

last-run - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

6

index.js

@@ -47,7 +47,9 @@ 'use strict';

function capture(fn){
function capture(fn, timestamp){
assert(isFunction(fn), 'Only functions can be captured');
assert(isExtensible(fn), 'Only extensible functions can be captured');
runtimes.set(fn, Date.now());
timestamp = timestamp || Date.now();
runtimes.set(fn, timestamp);
}

@@ -54,0 +56,0 @@

{
"name": "last-run",
"version": "1.0.0",
"version": "1.1.0",
"description": "Capture and retrieve the last time a function was run",

@@ -5,0 +5,0 @@ "author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com)",

@@ -44,5 +44,6 @@ # last-run

### lastRun.capture(fn)
### lastRun.capture(fn, [timestamp])
Takes a function (`fn`) and captures the current timestamp with `Date.now()`.
If passed the optional timestamp, captures that time instead of `Date.now()`.
The captured timestamp can then be retrieved using the `lastRun` function.

@@ -49,0 +50,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc