Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
typographic-quotes
Advanced tools
Micro module to help eliminate one of the bad typewriter habits.
npm install --save typographic-quotes
Use typographic quotes for your text with respect to your locale, basically for
proper primary and secondary quotes. Pass object with specified locale field as
second parameter. locale
field is mandatory. This module relies on
typographic-quotes-l10n-db
in choosing proper quotes
for every language.
In American English, double quotes are used normally (the “primary” style). If quote marks are used inside another pair of quote marks, then single quotes are used as the “secondary” style. For example: “Didn't she say ‘I like red best’ when asked her favorite wine?” he wondered to himself.
— from the Wikipedia
var quotes = require('typographic-quotes');
// in american english (en-us) primary quotes are “”, and secondary are ‘’.
// in danish (da) primary quotes are »«, and secondary are ›‹.
// `locale` field is mandatory
quotes(`foo 'foo' bar`, { locale: 'en-us' }); // foo “foo” bar
quotes(`foo 'foo' bar`, { locale: 'da' }); // foo »foo« bar
quotes(`foo "foo 'inside' bar" bar`, { locale: 'en-us' }); // foo “foo ‘inside’ bar” bar
quotes(`foo 'foo "inside" bar' bar`, { locale: 'da' }); // foo »foo ›inside‹ bar« bar
If you want to see proper apostrophes too, take a look at apostrophes and apostrophes-for-possessive-plurals typographic modules. Use first one before this module, second after: apostrophes → quotes → apostrophes-for-possessive-plurals
(order is important). Check complex usage in typography playground.
MIT © Vladimir Starkov
FAQs
Always use curly quotes
The npm package typographic-quotes receives a total of 5,472 weekly downloads. As such, typographic-quotes popularity was classified as popular.
We found that typographic-quotes 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.