New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@hapify/ejs

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapify/ejs

Sandbox for EJS templates

npmnpm
Version
1.2.0
Version published
Weekly downloads
10
-80%
Maintainers
2
Weekly downloads
 
Created
Source

Hapify EJS

Description

This repository provides a secured sandbox to render unsafe EJS templates

Build Status codecov

Usage

Basic usage

import { HapifyEJS } from '@hapify/ejs';

const script = `hello <%= value %>`;
const result = new HapifyEJS().run(script, { value: 'world' }); // result = 'hello world'

Advanced usage

import { HapifyEJS } from '@hapify/ejs';

const script = `hello <%= value %>`;
const result = new HapifyEJS({
    timeout: 200, // Maximum script execution time. Default to 1000ms.
}).run(script, { value: 'world' }); // result = 'hello world'

Keywords

hapify

FAQs

Package last updated on 20 Apr 2021

Did you know?

Socket

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.

Install

Related posts