npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mailbutler/eldr

v1.3.1

Published

Fast and accurate natural language detector based on eld by Nito TM - refactored by Bernhard K. Weisshuhn and Fabian Jäger.

Downloads

243

Readme

Efficient Language Detector, Refactored

Refactored version of Nito-ELD which exports type definitions and avoids toplevel await() for easier bundling.

Install

  • For Node.js
$ yarn add https://github.com/bkw/eldr

Usage

import { eldr } from "eldr";
/* or, to save bandwidth and memory usage:
import { eldr } from "eldr/lib/extra-small"
import { eldr } from "eldr/lib/small"
import { eldr } from "eldr/lib/medium" // default
import { eldr } from "eldr/lib/large"
*/

const detected = eldr.detect("Hola, cómo te llamas?");
console.log(
  detected.isReliable(),
  detected.iso639_1,
  detected.languageName,
  detected.getScores()
);

Output:

true es Spanish {
  es: 0.5289772727272727,
  et: 0.20935132575757573,
  ro: 0.20913825757575755,
  lv: 0.20886600378787873,
  nl: 0.11145833333333333,
  sq: 0.10797821969696969,
  lt: 0.10658143939393938,
  hr: 0.1064867424242424,
  pl: 0.1047466856060606,
  ca: 0.10466382575757575,
  sl: 0.10466382575757575,
  pt: 0.10445075757575756,
  yo: 0.1044152462121212
}

Languages

These are the ISO 639-1 codes of the 60 supported languages for Nito-ELD v1

'am', 'ar', 'az', 'be', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'gu', 'he', 'hi', 'hr', 'hu', 'hy', 'is', 'it', 'ja', 'ka', 'kn', 'ko', 'ku', 'lo', 'lt', 'lv', 'ml', 'mr', 'ms', 'nl', 'no', 'or', 'pa', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sq', 'sr', 'sv', 'ta', 'te', 'th', 'tl', 'tr', 'uk', 'ur', 'vi', 'yo', 'zh'

Full name languages:

Amharic, Arabic, Azerbaijani (Latin), Belarusian, Bulgarian, Bengali, Catalan, Czech, Danish, German, Greek, English, Spanish, Estonian, Basque, Persian, Finnish, French, Gujarati, Hebrew, Hindi, Croatian, Hungarian, Armenian, Icelandic, Italian, Japanese, Georgian, Kannada, Korean, Kurdish (Arabic), Lao, Lithuanian, Latvian, Malayalam, Marathi, Malay (Latin), Dutch, Norwegian, Oriya, Punjabi, Polish, Portuguese, Romanian, Russian, Slovak, Slovene, Albanian, Serbian (Cyrillic), Swedish, Tamil, Telugu, Thai, Tagalog, Turkish, Ukrainian, Urdu, Vietnamese, Yoruba, Chinese