
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
glost-difficulty
Advanced tools
Word difficulty extension for GLOST - generates and formats difficulty data
Word difficulty extension for GLOST - generates and formats difficulty data.
This package provides difficulty assessment for GLOST documents. It separates difficulty generation (determining word difficulty) from difficulty enhancement (formatting for display).
This package intentionally does NOT include heuristic difficulty scorers. Inaccurate difficulty levels are worse than no levels. You must provide a real difficulty provider based on:
beginner - Basic, easy words for beginnersintermediate - Moderate difficulty wordsadvanced - Difficult words for advanced learnerspnpm add glost-difficulty
import { createDifficultyGeneratorExtension, createDifficultyEnhancerExtension } from "glost-difficulty";
import { createJapaneseDifficultyProvider } from "glost-ja/extensions";
// Create JLPT-based provider
const provider = createJapaneseDifficultyProvider({
jlptLevel: "N3"
});
const generator = createDifficultyGeneratorExtension({
targetLanguage: "ja",
provider
});
const enhancer = createDifficultyEnhancerExtension();
const result = await processGLOSTWithExtensionsAsync(doc, [generator, enhancer]);
Creates extension that assesses word difficulty.
Options:
targetLanguage - ISO-639-1 language codeprovider - DifficultyProvider instanceskipExisting - Skip words with existing difficulty (default: true)Creates extension that formats difficulty data.
Options:
normalize - Normalize difficulty values (default: true)customMapping - Word → difficulty mappingsImplement the DifficultyProvider interface with real word lists:
import type { DifficultyProvider, DifficultyLevel } from "glost-difficulty";
export function createMyDifficultyProvider(
cefrLists: { A1: Set<string>, A2: Set<string>, B1: Set<string>, ... }
): DifficultyProvider {
return {
async getDifficulty(word, language) {
if (cefrLists.A1.has(word) || cefrLists.A2.has(word)) return "beginner";
if (cefrLists.B1.has(word) || cefrLists.B2.has(word)) return "intermediate";
if (cefrLists.C1.has(word) || cefrLists.C2.has(word)) return "advanced";
return undefined; // No data? Return undefined, don't guess!
}
};
}
Convenience function that creates both generator and enhancer.
Returns: [generator, enhancer]
MIT
FAQs
Word difficulty extension for GLOST - generates and formats difficulty data
The npm package glost-difficulty receives a total of 273 weekly downloads. As such, glost-difficulty popularity was classified as not popular.
We found that glost-difficulty demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.