
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Set an alarm that will call the given function at the specified time.
Install with npm:
$ npm install --save alarm
Install with yarn:
$ yarn add alarm
var alarm = require('alarm');
Set an alarm that will execute the provided function at the specified time.
Params
date
{Date}: a Date object or a string that can be passed to the Date constructor.fn
{Function}: Function to execute at the specified time.returns
{Function}: Returns a function that can be called to cancel the alarm.Example
// 2 seconds from now
var now = new Date();
var date = new Date(+now + 2000);
alarm(date, function() {
console.log('Hello, world!');
});
Set a recurring alarm that will execute the provide function even X milliseconds.
Params
ms
{Number}: Number of milliseconds to specify how often to execute the function.fn
{Function}: Function to execute every X milliseconds.returns
{Function}: Returns a function that may be called to cancel the recurring alarm.Example
var count = 0;
var cancel = alarm.recurring(1000, function() {
console.log((count++) + ' BEEP BEEP BEEP!');
if (count >= 5) {
cancel();
}
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Brian Woodward
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on May 10, 2017.
FAQs
Set an alarm that will call the given function at the specified time.
The npm package alarm receives a total of 2 weekly downloads. As such, alarm popularity was classified as not popular.
We found that alarm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.