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.
bulma-toast
Advanced tools
Bulma's pure JavaScript extension to display toasts. Basically a Bulma's notification implemented as a toast plugin.
The plugin comes with 5 options to be used as a JavaScript object:
message
: The actual message to be displayed.type
: Essentially a Bulma's css class. It can be is-primary
, is-link
, is-info
, is-success
, is-warning
, is-danger
, or any other custom class. Default is a whitesmoke background with dark text as shown here.duration
: Duration of the notification in milliseconds. Default is 2000
milliseconds.position
: Position where the notification will be shown. The default is top-right, so if you want it to be on the left just add is-left
to this option. Similarly, add is-bottom
to be displayed at the bottom, or is-center
to be centered. It can also be done with multiple classes like is-bottom is-left
.dismissible
: Whether the notification is dismissible or not. Default is false
.npm install --save bulma-toast
Link to bulma-toast.min.css <link href="bulma-toast.min.css" rel="stylesheet"/>
Link to bulma-toast.min.js <script src="bulma-toast.min.js"></script>
use bulma-toast to display a toast
bulmaToast.toast({ message: 'Hello There' })
bulmaToast.toast({ message: 'General Kenobi', type: 'is-danger' })
// Import the toast function
import { toast } from 'bulma-toast'
// Or use
// import { toast as superToast } from 'bulma-toast'
// to rename your import
toast({
message: 'Hello There',
type: 'is-success',
dismissible: true
})
A simple default object to prevent errors. Your options will be merged with these and the defaults will be used if the fields are not provided.
{
message: 'Your message here',
type: '',
duration: 2000,
position: 'is-right',
dismissible: false
}
Can you make this plugin better? Clean the mess I made? Feel free to do so!
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Bulma's pure JavaScript extension to display toasts
The npm package bulma-toast receives a total of 3,747 weekly downloads. As such, bulma-toast popularity was classified as popular.
We found that bulma-toast demonstrated a healthy version release cadence and project activity because the last version was released less than 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.