Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
bootstrap4-duration-picker
Advanced tools
Javascript library for selecting duration. Target input to which plugin is applied will contain duration in seconds.
Using Bower:
bower install bootstrap-duration-picker
Using NPM:
npm install bootstrap-duration-picker
Or simply copy bootstrap-duration-picker.css
and bootstrap-duration-picker.js
files to your project.
$('.duration-picker').durationPicker();
// or
$('.duration-picker').durationPicker({
// optional object with translations (English is used by default)
translations: {
day: 'dia',
hour: 'hora',
minute: 'minuto',
second: 'segundo',
days: 'dias',
hours: 'horas',
minutes: 'minutos',
seconds: 'segundos',
},
// defines whether to show seconds or not
showSeconds: false,
// defines whether to show days or not
showDays: true,
// callback function that triggers every time duration is changed
// value - duration in seconds
// isInitializing - bool value
onChanged: function (value, isInitializing) {
// isInitializing will be `true` when the plugin is initialized for the
// first time or when it's re-initialized by calling `setValue` method
console.log(value, isInitializing);
}
});
Method | Example | Description |
---|---|---|
setValue | $('#selector').data('durationPicker').setValue(0); | Allows to reinitialize duration picker value after it's been created. Accepts new number of seconds |
destroy | $('#selector').data('durationPicker').destroy(); | Destroys the plugin, reverting any DOM changes made by the plugin |
Please see LICENSE for licensing details.
FAQs
Bootstrap4 duration picker
The npm package bootstrap4-duration-picker receives a total of 26 weekly downloads. As such, bootstrap4-duration-picker popularity was classified as not popular.
We found that bootstrap4-duration-picker 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.