Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
safe-expr-eval — مُقيِّم تعبيرات آمن - بديل مباشر لـ expr-eval بدون ثغرة CVE-2025-12735 | Kitploit
أدوات/GitHubGitHub/alecasg555/safe-expr-eval
أدوات عامةتحليل الكودالبرمجة النصية والأتمتة
GitHubalecasg555/safe-expr-eval

safe-expr-eval

مُقيِّم تعبيرات آمن - بديل مباشر لـ expr-eval بدون ثغرة CVE-2025-12735

عرض المستودع
413منذ 3 أشهرلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة

safe-expr-eval

مُقيِّد تعابير سريع وخفيف الوزن للجافاسكريبت وتايبسكريبت.

محلل تعابير حديث بواجهة مألوفة، بدون أي تبعيات، ودعم كامل لتايبسكريبت.


الميزات

  • تحليل وتقييم سريع للتعابير
  • خفيف الوزن وخالٍ من التبعيات
  • دعم كامل لتايبسكريبت
  • واجهة بسيطة ومألوفة
  • دوال وثوابت مخصصة
  • متوافق مع ES2020+
  • تم اختباره جيدًا

التثبيت

root@kitploit:~
npm install safe-expr-eval

بدء سريع

الاستخدام الأساسي

root@kitploit:~
import { Parser } from 'safe-expr-eval';

const parser = new Parser();
const expr = parser.parse('2 * x + 1');

console.log(expr.evaluate({ x: 3 })); // 7
console.log(expr.evaluate({ x: 10 })); // 21

التقييم المباشر

root@kitploit:~
import { evaluate } from 'safe-expr-eval';

const result = evaluate('10 + 5 * 2');

console.log(result); // 20

التعابير المجمعة

root@kitploit:~
import { compile } from 'safe-expr-eval';

const fn = compile('price * quantity * (1 - discount)');

console.log(
  fn({
    price: 100,
    quantity: 2,
    discount: 0.1
  })
); // 180

العمليات المدعومة

الحسابية

root@kitploit:~
+  -  *  /  %

المقارنة

root@kitploit:~
==  !=  >  <  >=  <=

المنطقية

root@kitploit:~
and  or  not
&&   ||   !

أنواع البيانات

root@kitploit:~
Numbers   → 42, 3.14
Strings   → "hello"
Booleans  → true, false
Variables → price, user.name

الدوال المخصصة

root@kitploit:~
const parser = new Parser();

parser.functions.max = Math.max;
parser.functions.min = Math.min;
parser.functions.round = Math.round;

const expr = parser.parse(
  'round(max(a, b) * 1.5)'
);

console.log(
  expr.evaluate({
    a: 10,
    b: 20
  })
); // 30

الثوابت

root@kitploit:~
const parser = new Parser();

parser.consts.PI = Math.PI;
parser.consts.TAX_RATE = 0.15;

const expr = parser.parse(
  'price * (1 + TAX_RATE)'
);

console.log(
  expr.evaluate({
    price: 100
  })
); // 115

الواجهة البرمجية (API)

المُحلل (Parser)

إنشاء محلل

root@kitploit:~
new Parser()

تحليل تعبير

root@kitploit:~
parser.parse(expression)

تقييم تعبير

root@kitploit:~
parser.evaluate(expression, variables?)

سجل الدوال

root@kitploit:~
parser.functions

سجل الثوابت

root@kitploit:~
parser.consts

الدوال المستقلة

evaluate

root@kitploit:~
evaluate(expression, variables?)

compile

root@kitploit:~
compile(expression)

الاختبار

root@kitploit:~
npm test
root@kitploit:~
npm run test:coverage

الرخصة

MIT

راجع ملف LICENSE للحصول على التفاصيل.


المساهمة

مرحب بالطلبات (Pull requests) والمساهمات.


المشكلات

يرجى فتح مشكلة إذا وجدت خطأً أو لديك طلب ميزة.


المؤلف

اليخاندرو كاستريون

root@kitploit:~
GitHub: https://github.com/
تنزيل الأداة