
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
roll-a-die
Advanced tools
Simple 3D dice roll animator by CSS3 Animation.
Copy dist/roll-a-die.js into your library folder Load it into your HTML script
<script type="text/javascript" src="path/to/roll-a-die.js"></script>
You can use the UNPKG link https://unpkg.com/roll-a-die@1.3.0/dist/roll-a-die.js
. Remember to update the package number to the most recent.
Call the method with its options.
rollADie({ element, numberOfDice: 2, callback});
Install with npm.
npm install --save roll-a-die
Install with yarn.
yarn add roll-a-die
import the library
ES5
const rollADie = require('roll-a-die');
ES6
import rollADie from 'roll-a-die';
Call the method
rollADie({ element, numberOfDice: 2, callback });
rollADie({ element, numberOfDice: 2, callback, soundVolume: 1 });
rollADie({ element, numberOfDice: 2, callback, delay: 1000 });
rollADie({ element, numberOfDice: 2, callback, values: [3, 4] });
element
: The element to render die animation on. Type: HTMLElementnumberOfDice
: The number of dice to use.` Type: numbercallback
: Called when animation is finished. Returns an array of the values from throw. Type: FunctionsoundVolume
: Set volume of audio between 0 and 1. (Optional) Defaults to 1. Type: numberdelay
: Time in milliseconds to delay before removing animations (Optional). Type: numbervalues
: Values to show on die face. When provided, it overrides library genrated values. (Optional). Type: Array of numbersMIT License
FAQs
Simple 3D dice roll using CSS3 animation.
The npm package roll-a-die receives a total of 45 weekly downloads. As such, roll-a-die popularity was classified as not popular.
We found that roll-a-die demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.