0.0.2 • Published 9 months ago

@tegor/safe-eval v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@tegor/safe-eval

NPM version

Forked from safe-eval

Changes in this fork

  • Support es module
  • Support typescript definition
  • Delete IIFE in source code

Install

pnpm install @tegor/safe-eval

Usage

commomjs

const safeEval = require('@tegor/safe-eval');

const code = '"app" + "le"'
const evaluated = safeEval(code)

es module

import safeEval fromm '@tegor/safe-eval';

const code = '"app" + "le"'
const evaluated = safeEval(code)

License

MIT License © 2022 fightwithtiger

0.0.2

9 months ago