Skip to content
This repository was archived by the owner on Apr 21, 2021. It is now read-only.
/ ejs Public archive

This repository provides a secured sandbox to render unsafe EJS templates

License

Notifications You must be signed in to change notification settings

hapify/ejs

Repository files navigation

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'

About

This repository provides a secured sandbox to render unsafe EJS templates

Resources

License

Stars

Watchers

Forks

Packages

No packages published