New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

alphabets

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alphabets

Many different alphabets, many different use cases, zero depencencies.

Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
5
-64.29%
Maintainers
1
Weekly downloads
 
Created
Source

Alphabets

A tiny JS dependency which exports many alphabets for many use cases.

npm Stand With Ukraine

Why

I have seen code like this:

const alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

Or worse:

const alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];

My opinion about this: it's ugly, and it pollutes your code. Instead, you should do it like so:

import { latin } from 'alphabets';
// or
const alphabets = require('alphabets');

doSomethingWithTheAlphabet(latin);

Much cleaner, right?

Installation

Use npm: npm i alphabets. Or if you prefer Yarn: yarn add alphabets.

Supported alphabets

See below for usage instructions.

AlphabetExport name
Danishdanish
Faroesefaroese
Greek (modern)greek
Greek (ancient/polytonic)greekPolytonic
Icelandicicelandic
Latin (abcdefg etc.)latin
Norwegiannorwegian
Russianrussian
Swedishswedish
Ukrainianukrainian

How to use

Replace <alphabetYouWantToUse> with an alphabet identifier this package supports:

import { <alphabetYouWantToUse> } from 'alphabets';

or:

const alphabets = require('alphabets');
console.log(alphabets.<alphabetYouWantToUse>);

(c) 2021-2023 Romein van Buren. Licensed under the MIT license.

For the full copyright and license information, please view the license.md file that was distributed with this source code.

Keywords

alphabet

FAQs

Package last updated on 04 May 2023

Did you know?

Socket

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.

Install

Related posts