1.3.1 • Published 1 year ago

@hapify/ejs v1.3.1

Weekly downloads
8
License
MIT
Repository
-
Last release
1 year ago

Hapify EJS

Description

This repository provides a secured sandbox to render unsafe EJS templates

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 5000ms.
}).run(script, { value: 'world' }); // result = 'hello world'
1.3.1

1 year ago

1.2.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago