Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@6degrees/arabic-strings
Advanced tools
An NPM package that extends the native String object with methods to help when dealing with Arabic strings for node and the browser. > NPM updated package of @ahmads/arabicString repo
An NPM package that extends the native String object with methods to help when dealing with Arabic strings for node and the browser.
NPM updated package of @ahmads/arabicString repo
const arabicString = require('@6degrees/arabic-strings');
The percentage of Arabic letters in the String
.
arabicString.howArabic('foobar');
//=> 0.0
arabicString.howArabic('فوو bar');
//=> 0.5
arabicString.howArabic('فوبار');
//=> 1.0
The percentage of non-Arabic letters in the String
.
arabicString.howNotArabic('فوبار');
//=> 0.0
arabicString.howNotArabic('فوو bar');
//=> 0.5
arabicString.howNotArabic('foobar');
//=> 1.0
Is the String
Arabic, based on a given threshold
between 0
and 1
. Defaults to 0.79
.
arabicString.isArabic('فوو');
//=> true
arabicString.isArabic('فوو bar baz');
//=> false
Does the String
have any Arabic letter.
arabicString.hasArabic('فوو bar');
//=> ture
arabicString.hasArabic('foo bar');
//=> false
Will return the String
without the diacritics.
arabicString.removeTashkel('مٌحمْد');
//=> 'محمد'
arabicString.removeTashkel('وَتُرى الْكَوَاكِبِ فِي الْمَجَرَّةِ شَرَعَا*** مِثْلُ الظِّباءِ كوارعا فِي جَدْوَلِ');
//=> 'وترى الكواكب في المجرة شرعا *** مثل الظباء كوارعا في جدول'
Will return the String
without the diacritics.
arabicString.removeTatwel('مــرحــبــا');
//=> 'مرحبا'
Will return the String
without the diacritics, and clean characters.
arabicString.sanitize(`أَنا الَّذي نَظَرَ الأَعمى إِلى أَدَبي ... وَأَسمَـعَت كَلِماتي مَن بِهِ صَمَمُ
أَنـامُ مِلءَ جُفوني عَن شَوارِدِهــا ... وَيَسهَرُ الخَلقُ جَرّاها وَيَختَصِمُ
وَجـــاهِلٍ مَدَّهُ في جَهلِهِ ضَحِكي ... حَتّى أَتَتهُ يَدٌ فَرّاسَــــــةٌ وَفَـــــمُ
`);
/*=> `انا الذي نظر الاعمي الي ادبي ... واسمعت كلماتي من به صمم
انام ملء جفوني عن شواردها ... ويسهر الخلق جراها ويختصم
وجاهل مده في جهله ضحكي ... حتي اتته يد فراسه وفم
`
*/
(The MIT License)
1.0.1
FAQs
An NPM package that extends the native String object with methods to help when dealing with Arabic strings for node and the browser. > NPM updated package of @ahmads/arabicString repo
The npm package @6degrees/arabic-strings receives a total of 0 weekly downloads. As such, @6degrees/arabic-strings popularity was classified as not popular.
We found that @6degrees/arabic-strings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.