
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
intl-locale-textinfo-polyfill
Advanced tools
Library will help you to detect if the locale is right-to-left language.
This library will help you to detect if the locale is right-to-left language or not.
It implements part of this now Stage 3 intl-locale-info proposal.
The library has begun as a fork of rtl-detect,
but it strives to adhere to the Intl.Locale
(textInfo
) proposal (notably,
locales with underscores as in the form en_US
are not accepted).
import Locale from 'intl-locale-textinfo-polyfill';
const { direction } = new Locale('he').textInfo;
// "rtl"
import 'intl-locale-textinfo-polyfill/lib/polyfill.js';
const { direction } = new Intl.Locale('he').textInfo;
// `direction` will be "rtl"
This returns an object with the language direction for the locale.
Examples:
const { direction } = new Intl.Locale('ar-JO').textInfo;
// `direction` will be "rtl"
const { direction } = new Intl.Locale('ar').textInfo;
// `direction` will be "rtl"
const { direction } = new Intl.Locale('en-US')).textInfo;
// `direction` will be "ltr"
2.1.1
outFile
FAQs
Library will help you to detect if the locale is right-to-left language.
The npm package intl-locale-textinfo-polyfill receives a total of 1,787 weekly downloads. As such, intl-locale-textinfo-polyfill popularity was classified as popular.
We found that intl-locale-textinfo-polyfill 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.