Socket
Socket
Sign inDemoInstall

express-flash-notification

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.5.0

351

index.js

@@ -1,88 +0,43 @@

/**
* Provides Flash Notification Middleware
*
* @module Express Flash Notification
/*!
* express-flash-notification
* Copyright(c) 2015-2017 Carlos Ascari Gutierrez Hermosillo
* MIT License
*/
var format = require('util').format
var isArray = require('util').isArray
var async = require('async')
const { format, isArray } = require('util');
const async = require('async');
/**
* Default value for when calling the `req.flash` method withouth specifying
* Default value used when calling the `req.flash` method withouth specifying
* the redirect argument.
*
* @property REDIRECT
* @type Boolean|String
* @type {Boolean|String}
* @final
*/
var REDIRECT = true
const REDIRECT = true;
/**
* Default name of property stored in req.session that holds an array of notifications
* to display.
*
* @property SESSION_NAME
* @type String
* @final
* Default middleware options
* @type {Object}
* @private
*/
var SESSION_NAME = 'flash'
const DEFAULT_OPTIONS = {
sessionName: 'flash',
utilityName: 'flash',
localsName: 'flash',
viewName: 'flash',
beforeSingleRender: function(item, callback) {
callback(null, item);
},
afterAllRender: function(htmlFragments, callback) {
callback(null, htmlFragments.join('\n'));
},
};
/**
* Default name of method stored in `req` object used to trigger a request notification.
*
* @property UTILITY_NAME
* @type String
* @final
*/
var UTILITY_NAME = 'flash'
/**
* Default locals property name used to render the flash notification markup.
*
* @property LOCALS_NAME
* @type String
* @final
*/
var LOCALS_NAME = 'flash'
/**
* Default view template filename (extension) that will be passed to tthe express
* template engine to generate the flash notification markup.
*
* @property VIEW_NAME
* @type String
* @final
*/
var VIEW_NAME = 'flash'
/**
* Default callback that is called before each notification is rendered using the
* express template engine.
*
* @method BEFORE_SINGLE_RENDER
* @final
*/
var BEFORE_SINGLE_RENDER = function(item, callback){callback(null, item)}
/**
* Default callback that is called after all notifications have been rendered by the
* express template engine.
*
* @method BEFORE_SINGLE_RENDER
* @param htmlFragments {Array}
* @final
*/
var AFTER_ALL_RENDER = function(htmlFragments, callback){callback(null, htmlFragments.join('\n'))}
/**
* Utility used to check whether an argument is a Native Object
*
* @method isObject
* @return Boolean
* @return {Boolean}
* @private
*/
function isObject(sample)
{
return (sample && typeof sample === 'object' && !isArray(sample))
}
const isObject = (sample) => sample && typeof sample === 'object' && !isArray(sample);

@@ -92,156 +47,120 @@ /**

* The actual middleware is returned.
*
* @method Module
* @param app {Express}
* @param options {Object}
* @param {Express} app
* @param {Object} options
*/
function Module (app, options)
{
if (isObject(options))
{
SESSION_NAME = options.session_name || SESSION_NAME
UTILITY_NAME = options.utility_name || UTILITY_NAME
LOCALS_NAME = options.locals_name || LOCALS_NAME
VIEW_NAME = options.view_name || VIEW_NAME
BEFORE_SINGLE_RENDER = (typeof options.beforeSingleRender === 'function')
? options.beforeSingleRender
: BEFORE_SINGLE_RENDER
AFTER_ALL_RENDER = (typeof options.afterAllRender === 'function')
? options.afterAllRender
: AFTER_ALL_RENDER
}
function Module (app, options=DEFAULT_OPTIONS) {
const sessionName = options.sessionName || options.session_name || DEFAULT_OPTIONS.sessionName;
const utilityName = options.utilityName || options.utility_name || DEFAULT_OPTIONS.utilityName;
const localsName = options.localsName || options.locals_name || DEFAULT_OPTIONS.localsName;
const viewName = options.viewName || options.view_name || DEFAULT_OPTIONS.viewName;
const beforeSingleRender = options.beforeSingleRender || options.beforeSingleRender || DEFAULT_OPTIONS.beforeSingleRender;
const afterAllRender = options.afterAllRender || options.afterAllRender || DEFAULT_OPTIONS.afterAllRender;
/**
* Render Notifications on queue
*
* @method render
* @private
*/
function render (req, res, next)
{
if (req.session[SESSION_NAME].length === 0)
{
next()
}
else
{
var resultHTML = []
/**
* Render notifications in queue.
* @private
*/
function render(req, res, next) {
if (!req.session[sessionName].length) {
next();
} else {
const resultHTML = [];
async.each(
req.session[sessionName],
function(item, next) {
beforeSingleRender(item, function(error, item) {
if (error) return next(error);
app.render(viewName, item, function(error, html) {
if (error) return next(error);
resultHTML.push(html);
next(null);
})
})
},
function(error) {
if (error) return next(error);
req.session[sessionName].length = 0;
afterAllRender(resultHTML, function(error, html) {
if (error) return next(error);
res.locals[localsName] = html;
next();
})
}
)
}
}
async.each(
req.session[SESSION_NAME],
function(item, callback)
{
BEFORE_SINGLE_RENDER(item, function(err, item){
if (err) return callback(err)
app.render(VIEW_NAME, item, function(err, html) {
if (err) return callback(err)
resultHTML.push(html)
callback(null)
})
})
},
function(err)
{
if (err) return next(err)
req.session[SESSION_NAME].length = 0
AFTER_ALL_RENDER(resultHTML, function(err, html){
if (err) return next(err)
res.locals[LOCALS_NAME] = html
next()
})
}
)
}
}
/**
* Adds flash method to req object and renders all notifications found in
* req.session
* @param {ReadStream} req
* @param {WriteStream} res
* @param {Function} next
*/
function FlashMiddleware(req, res, next) {
if (!isObject(req.session)) throw new Error('express-session is required. (npm i express-session)');
if (!req.session[sessionName] || !isArray(req.session[sessionName])) req.session[sessionName] = [];
/**
* Adds flash method to req object and renders all notifications found in
* req.session
*
* @method FlashMiddleware
*/
function FlashMiddleware(req, res, next)
{
if (!isObject(req.session))
{
throw new Error('express-session is required')
}
else
{
if (!isArray(req.session[SESSION_NAME]))
{
req.session[SESSION_NAME] = []
}
}
/**
* Utility used to programmatically add flash notifications
* @method Flash Utility
*/
req[utilityName] = function() {
const argc = arguments.length;
let notification;
let redirect = REDIRECT;
/**
* Utility used to programmatically add flash notifications
*
* @method Flash Utility
*/
req[UTILITY_NAME] = function()
{
var notification
var redirect = REDIRECT
var argc = arguments.length
// Parse arguments
if (argc) {
if (argc === 1) {
const arg = arguments[0];
if (isObject(arg)) {
notification = arg;
redirect = (arg.redirect === undefined) ? redirect : arg.redirect;
} else {
notification = {
message: '' + arg
};
}
} else {
notification = {
type: '' + arguments[0],
message: '' + arguments[1]
};
redirect = (arguments[2] === undefined) ? redirect : arguments[2];
}
}
// Parse arguments
if (argc === 1)
{
var arg = arguments[0]
if (isObject(arg))
{
notification = arg, redirect = (arg.redirect === undefined) ? redirect : arg.redirect
}
else
{
notification = { message: arg + ''}
}
}
else if (argc > 1)
{
notification = { type: arguments[0] + '', message: arguments[1] + '' }
redirect = (arguments[2] === undefined) ? redirect : arguments[2]
}
else
{
return
}
// Queue Notification
if (notification && req.session[sessionName]) {
req.session[sessionName].push(notification);
}
// Queue Notification
if (notification)
{
req.session[SESSION_NAME].push(notification)
}
// If redirect is set, refresh or redirect, accordingly. Otherwise, render the
// notifications now since it's on this request where they will be displayed.
if (redirect) {
const redirectUrl = (typeof redirect === 'string') ? redirect : req.originalUrl;
res.redirect(redirectUrl);
} else {
/**
* When there is no redirect, notifications must be rendered now and since
* rendering is async (and this method is sync), a *promise* like function is returned.
* The function can be called with a callback that will be called after all notifcations
* are rendered, otherwise, rendering will be done during the next request.
*/
return function ManualRender(callback) {
render(req, res, callback);
}
}
}
// If redirect is set, refresh or redirect, accordingly. Otherwise, render the
// notifications now since it's on this request where they will be displayed.
if (redirect)
{
var redirectUrl = (typeof redirect === 'string') ? redirect : req.originalUrl
res.redirect(redirectUrl)
}
else
{
/**
* When there is no redirect, notifications must be rendered now and since
* rendering is async (and this method is sync), a *promise* like function is returned.
* The function can be called with a callback that will be called after all notifcations
* are rendered, otherwise, rendering will be done during the next request.
*/
return function ManualRender(callback)
{
render(req, res, callback)
}
}
}
/**
* Process Queued Notifications
*/
render(req, res, next);
}
/**
* Process Queued Notifications
*/
render(req, res, next)
}
return FlashMiddleware
return FlashMiddleware;
}
module.exports = Module
module.exports = Module;
{
"name": "express-flash-notification",
"version": "0.4.0",
"version": "0.5.0",
"description": "Express.js flash notifications that works with any template engine",

@@ -24,3 +24,3 @@ "main": "index.js",

],
"author": "Ascari Gutierrez Hermosillo <carlos.ascari.x@gmail.com>",
"author": "Ascari Gutierrez Hermosillo <ascari.gtz@gmail.com>",
"license": "MIT",

@@ -27,0 +27,0 @@ "dependencies": {

@@ -1,51 +0,49 @@

# express-flash-notification
# [express-flash-notification]()
This module provides a way to set one-time notifications to be displayed during or after processing a request. Notifications are stored in session and are removed once they have been rendered.
This module provides a way to set one-time notifications to be displayed during or after processing a request.
Notifications are stored in session and are removed once they have been rendered.
**Key Points**
- **Template Engine Agnostic**, works with any engine you are using logic/logicless.
- Supports for **Multiple notifications** to be sent.
- **Template engine agnostic**, works with any engine you are using (logic/logicless).
- Supports for **multiple notifications** to be sent.
- **Auto refreshes or redirects** the page to display the notification.
- Allows you to manipulate the notification output **before and after** it has been created.
This allows you to control the presentation of all notifications with custom html/js.
- **No need to refresh or redirect**, notifications can be rendered on the same request.
If you want to see it in action: [express-flash-notification-example](https://github.com/carlosascari/express-flash-notification-example)
### Why?
`connect-flash` is nice if your template engine can do some conditional logic like EJS however, if you are using a logic-less engine, like `hogan-express` things get akward IMO.
I realized [connect-flash](https://github.com/jaredhanson/connect-flash) required a template engine with conditional logic to test wether or not to show content.
Implementation felt akward when applying this middleware to a logic-less tempalte engine like Mustache.
So I wrote a flash notification that can be used in any template engine.
I needed something simple like:
`req.flash('info', 'my message')`
in my controller/middleware and
`{{{flash}}}`
in my layout
Then the HTML for each alert gets placed in `{{{flash}}}` including some client side javascript so it doesn't just appear `$(elm).slideDown()` **FTW**
While at the same time, adding the markup nessary to display the alert depending on its **type** (so *info* is blue, *error* is red, etc).
## Install
```
npm install express-flash-notification --save
npm i express-flash-notification --save
```
## Usage
Flash notifications are stored in the session. You will need the `cookieParser` middleware and the `session` middleware. Depending on your express version it may be bundled in express or for the newer releases you'll have to npm install them as seperate modules. I'm using express 4.x in the following examples.
Flash notifications are stored in a `session`.
You will need the `cookieParser` middleware and the `session` middleware installed.
Depending on your express version it may be bundled in express or for newer releases you will have to `npm install` them as seperate modules.
- Using express 4.x in the following examples.
- Using Mustache template engine in the following examples.
You must pass the express application instance as the first argument in the `flash()` middleware so `app.render` can be used to create your notification using your chosen template engine and views directory.
You must pass the express application instance as the first argument in the `flash()` middleware so the middleware can take advantage of the `app.render` method in order to create your notification using your own template engine and `views` directory.
```javascript
var flash = require('express-flash-notification')
var cookieParser = require('cookie-parser')
var session = require('express-session')
const flash = require('express-flash-notification');
const cookieParser = require('cookie-parser');
const session = require('express-session');
var app = express()
const app = express();
// setup views directory, view engine, etc...
app.use(cookieParser())
app.use(session({...}}))
app.use(flash(app))
app.use(cookieParser());
app.use(session({...}}));
app.use(flash(app));
```

@@ -57,10 +55,10 @@

```html
<<!DOCTYPE html>
```html5
<!DOCTYPE html>
<html>
<head>
<title></title>
<title></title>
</head>
<body>
{{{flash}}}
{{{flash}}}
</body>

@@ -70,47 +68,56 @@ </html>

**NOTICE**: If you are using the `ejs` template engine, please keep in mind that variables are stored in a locals objects.
So in the above template you would use: `<%- locals.flash %>` for unescaped html and `<%= locals.message %>` for escaped html.
##### In your Views
By default, a view called `flash` in your `views` directory will be retrieved and used as the default template for your notifications.
**By default, a view named `flash` in your `views` directory will be retrieved and used as the default template for your notifications.**
The local variables `type` and `message` will be set, depending on the type and message passed when calling **req.render**
**flash.html** (I'm using mustache in this example)
*flash.html*
```html
<div class="alert flash">
<button type="button" class="close">×</button>
<i class="fa sign"></i><strong>{{type}}</strong>
<span>{{message}}</span>
<button type="button" class="close">×</button>
<i class="fa sign"></i><strong>{{type}}</strong>
<span>{{message}}</span>
</div>
```
### req.flash API
**Note** A `notification` is an object where its properties become the local variables when rendering the it using the express rendering engine of your choice.
There are several ways to trigger a flash notification:
- **req.flash**(*String*)
Sets local variable `message` to the string provided, `type` will become an empty string. Will refresh the current page.
**Note** A `notification` is a *Object* with properties that become local view variables when rendering, using the express rendering engine of your choice.
- **req.flash**(*String*, *String*)
First string is the `type` local variable, the second is the `message` local variable. Will refresh the current page.
- **req.flash**(*String* message)
Sets local variable `message` to the string provided.
Sets local variable `type` to a empty string.
Will refresh the current page.
- **req.flash**(*String*, *String*, *String*)
Similar to to above, except last argument as a string defines which page to redirect to.
- **req.flash**(*String* type, *String* message)
First string is the `type` local variable, the second is the `message` local variable.
Will refresh the current page.
- **req.flash**(*String*, *String*, *Boolean*)
Same as above. Third variable as a boolean decides whether or not to refresh the page.
**NOTE** If set to false, notification will not be rendered until the next request. If you want the notification to be rendered on the current request, you can use a function that is returned by `req.flash`, simply call the function with a callback, the callback will be executed once rendering is complete.
**example**
```
app.all(function SampleExpressRoute(req, res){
var manualRender = req.flash('warn', 'tell them now!', false)
manualRender(function(err){
if (err) throw err
res.render('layouts/internal')
})
})
```
- **req.flash**(*String* type, *String* message, *String* redirectUrl)
Last argument as a *String* defines which page to redirect to.
- **req.flash**(*object*)
- **req.flash**(*String* type, *String* message, *Boolean* renderInThisRequest)
Third argument as a *Boolean* determines whether or not to refresh the page.
**NOTE** If set to `false`, notifications will not be rendered until the next request.
If you still want the notification to be rendered on the current request, you can use a function that is returned by `req.flash`
Call the function with a callback, the callback will be executed once rendering is complete.
**example**
```
app.all(function SampleExpressRoute(req, res) {
const manualRender = req.flash('warn', 'tell them now!', false);
manualRender(function(error) {
if (error) throw error
res.render('layouts/internal');
})
})
```
- **req.flash**(*Object* notification)
You can pass an object as the first argument, the object's properties will be exposed as local variables when rendering the notification template.

@@ -135,45 +142,36 @@ The property `redirect` is reserved and functions just as you'd expect; a *Boolean* determines if it will refresh, or as a *String* you specify where to redirect to.

```javascript
app.use('/login', function loginProcessor(req, res, next){
if (req.method !== 'POST') return next()
if (!req.body) return next(new Error('no data was sent to the server, please try again'))
var user = req.body.user
var pass = req.body.pass
app.use('/login', function loginProcessor(req, res, next) {
if (req.method !== 'POST') return next();
if (!req.body) return next(new Error('no data was sent to the server, please try again'));
const user = req.body.user;
const pass = req.body.pass;
if (user && pass)
{
if (user === 'root' && pass === 'toor')
{
res.redirect('/dashboard')
}
else
{
req.flash('info', 'invalid username or password')
}
}
else
{
req.flash('info', 'you must enter your username and password to login')
}
})
if (user && pass) {
if (user === 'root' && pass === 'toor') {
res.redirect('/dashboard');
} else {
req.flash('info', 'invalid username or password');
}
} else {
req.flash('info', 'you must enter your username and password to login');
}
});
app.use('/login', function loginErrorHandler(err, req, res, next){
if (err.message)
{
req.flash('error', err.message)
}
else
{
console.log('there was a nasty login error: %s', err.stack)
next()
}
})
app.use('/login', function loginErrorHandler(error, req, res, next) {
if (error.message) {
req.flash('error', error.message);
} else {
console.log('there was a nasty login error: %s', error.stack);
next();
}
});
app.get('/login', function loginRenderer(req, res, next){
res.render('external', {
partials: {
content: 'external/login'
}
})
})
app.get('/login', function loginRenderer(req, res, next) {
res.render('external', {
partials: {
content: 'external/login'
}
});
});
```

@@ -183,30 +181,32 @@

By default, **req.flash** will redirect to the current url, effectively refreshing the page so to display the flash notification. It is important that your logic uses `return` when using flash or conditioning so you don't get the *headers have already been sent* error.
By default, **req.flash** will redirect to the current url, effectively refreshing the page so to display the flash notification.
It is important that your logic uses `return` when using flash or some form of conditioning so you don't get the *headers have already been sent* error.
For example below, if 2 + 2 ever equals 'fish' the `req.flash` method will send out the redirect headers, and execution will continue until the `next` function is called, `next` will also try to set the response headers
For example below, if 2 + 2 ever equals 'fish' the `req.flash` method will send out the redirect headers, and execution will continue until the `next` function is called, the `next` call will also try to set the response headers.
```javascript
app.use('/get-busy', function(req, res, next){
if (2 + 2 === 'fish')
{
req.flash('error', 'fairies!')
}
// ... other logics go here
next()
app.use('/get-busy', function(req, res, next) {
if (2 + 2 === 'fish') {
req.flash('error', 'fairies!');
}
// ... other logics go here
next();
})
```
In the case above, and in case you want to send multiple notifications you can disable the redirect by setting the third parameter to `false`
Keeping in mind the case above, and in case you want to send multiple notifications you can disable the redirect by setting the third parameter to `false`.
```javascript
app.use('/get-busy', function(req, res, next){
if (2 + 2 === 'fish')
{
return req.flash('error', 'fairies!', '/impossible')
}
// ... other logics go here
req.flash('success', 'logics are done', false)
next()
app.use('/get-busy', function(req, res, next) {
if (2 + 2 === 'fish') {
return req.flash('error', 'fairies!', '/impossible');
}
// ... other logics go here
// headers are not set, so calling next is safe
req.flash('success', 'logics are done', false);
next();
})

@@ -220,22 +220,22 @@ ```

When setting the flash middleware, the second parameter accepts an object for configuration.
Below is an example with all the options set to their defaults
Below is an example with all the options set to their defaults.
```javascript
app.use(flash(app, {
session_name: 'flash',
utility_name: 'flash',
locals_name: 'flash',
view_name: 'flash',
beforeSingleRender: function(item, callback){callback(null, item)},
afterAllRender: function(htmlFragments, callback){callback(null, htmlFragments.join('\n'))}
}))
sessionName: 'flash',
utilityName: 'flash',
localsName: 'flash',
viewName: 'flash',
beforeSingleRender: function(item, callback){ callback(null, item) },
afterAllRender: function(htmlFragments, callback){ callback(null, htmlFragments.join('\n')) }
}));
```
- **session_name** Is the key used to store the notifications in session: `req.session[session_name]`
- **sessionName** Is the key used to store the notifications in session: `req.session[sessionName]`
- **utility_name** Is the name of the function that is exposed in the `req` object, the one used to add new notifications: `req[utility_name]('info', 'hello')`
- **utilityName** Is the name of the function that is exposed in the `req` object, the one used to add new notifications: `req[utilityName]('info', 'hello')`
- **locals_name** Is the `locals` variable name where all your notifications will be placed, make sure it does not escape HTML: `{{{locals_name}}}`
- **localsName** Is the `locals` variable name where all your notifications will be placed, make sure it does not escape HTML: `{{{localsName}}}`
- **view_name** Is the name of the view that will be used as the template for all notifications: `app/views/view_name.html`
- **viewName** Is the name of the view that will be used as the template for all notifications: `app/views/viewName.html`

@@ -262,5 +262,5 @@ - **beforeSingleRender** Is called right before each notification is rendered, allowing you to add/remove or modify the local variables passed to the renderer.

<div class="alert flash {{alert_class}}" style="display:none">
<button type="button" class="close">×</button>
<i class="fa {{icon_class}} sign"></i><strong>{{type}}</strong>
<span>{{{message}}}</span>
<button type="button" class="close">×</button>
<i class="fa {{icon_class}} sign"></i><strong>{{type}}</strong>
<span>{{{message}}}</span>
</div>

@@ -274,49 +274,45 @@ ```

app.use(require('express-flash-notification')(app, {
view_name: 'elements/flash',
beforeSingleRender: function(notification, callback)
{
if (notification.type)
{
switch(notification.type)
{
case 'error':
notification.alert_class = 'alert-danger'
notification.icon_class = 'fa-times-circle'
break;
case 'alert':
notification.alert_class = 'alert-warning'
notification.icon_class = 'fa-times-circle'
break;
case 'info':
notification.alert_class = 'alert-info'
notification.icon_class = 'fa-times-circle'
break;
case 'success':
notification.alert_class = 'alert-success'
notification.icon_class = 'fa-check'
break;
case 'ok':
notification.alert_class = 'alert-primary'
notification.icon_class = 'fa-check'
break;
}
}
callback(null, notification)
},
afterAllRender: function(htmlFragments, callback)
{
// Naive JS is appened, waits a while expecting for the DOM to finish loading,
// The timeout can be removed if jOuery is loaded before this is called, or if you're using vanilla js.
htmlFragments.push([
'<script type="text/javascript">',
' var timer = setInterval(function(){',
' if (window.jOuery){',
' clearInterval(timer)',
' $(".alert.flash").slideDown().find(".close").on("click", function(){$(this).parent().slideUp()})',
' }',
' }, 200)',
'</script>',
].join(''))
callback(null, htmlFragments.join(''))
},
viewName: 'elements/flash',
beforeSingleRender: function(notification, callback) {
if (notification.type) {
switch(notification.type) {
case 'error':
notification.alert_class = 'alert-danger'
notification.icon_class = 'fa-times-circle'
break;
case 'alert':
notification.alert_class = 'alert-warning'
notification.icon_class = 'fa-times-circle'
break;
case 'info':
notification.alert_class = 'alert-info'
notification.icon_class = 'fa-times-circle'
break;
case 'success':
notification.alert_class = 'alert-success'
notification.icon_class = 'fa-check'
break;
case 'ok':
notification.alert_class = 'alert-primary'
notification.icon_class = 'fa-check'
break;
}
}
callback(null, notification)
},
afterAllRender: function(htmlFragments, callback) {
// Naive JS is appened, waits a while expecting for the DOM to finish loading,
// The timeout can be removed if jOuery is loaded before this is called, or if you're using vanilla js.
htmlFragments.push([
'<script type="text/javascript">',
' var timer = setInterval(function(){',
' if (window.jOuery){',
' clearInterval(timer)',
' $(".alert.flash").slideDown().find(".close").on("click", function(){$(this).parent().slideUp()})',
' }',
' }, 200)',
'</script>',
].join(''))
callback(null, htmlFragments.join(''))
},
}))

@@ -328,12 +324,9 @@ ```

```javascript
app.use('/bleh/:ok', function(req, res, next){
if (req.params.ok)
{
req.flash('ok', 'Everything is A-O-K')
}
else
{
req.flash('warn', 'Quick! everybody panic!')
}
})
app.use('/bleh/:ok', function(req, res, next) {
if (req.params.ok) {
req.flash('ok', 'Everything is A-O-K');
} else {
req.flash('warn', 'Quick! everybody panic!');
}
});
```

@@ -340,0 +333,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc