@formio/protected-eval
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

Form.io Protected Eval Plugin

This plugin makes formiojs library to use sandboxed eval with custom js-interpreter instead of default eval function.

Usage

import ProtectedEval from '@formio/protected-eval';
import { Formio } from 'formiojs';

Formio.use(ProtectedEval);

Differences with classic eval

Plugin doesn't allow usage of following variables in custom scripts:

  • instance
  • self

There is also a performance regression when this library is used. If you have more than 100 calculated values within your form, you will see a noticable performance decrease in the runtime performance of the form.

Package Sidebar

Install

npm i @formio/protected-eval

Weekly Downloads

284

Version

1.2.2

License

ISC

Unpacked Size

253 kB

Total Files

13

Last publish

Collaborators

  • brendanbond
  • alexeynikipelau
  • ryanformio
  • lane-formio
  • tanyagashtold
  • edwinanciani
  • travist