Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@ordbok/core
Advanced tools
Core system to create a dictionary out of Markdown files.
The following example shows a Markdown source file named english.md
:
English
=======
Translation: English ; the English
Grammar: Noun ; Neuter
New Norwegian
=============
Translation: engelsk ; engelsken
Grammar: Noun ; Masculine
The following example takes a Markdown source folder to build dictionary files
into a ./build/dictionary
folder:
$ npx ordbok-assembler ./markdown ./build/dictionary
The following TypeScript code uses the dictionary files to find a translation:
import { Dictionary, Utilities } from `@ordbok/core`;
const myDictionary = new Dictionary('build/dictionary');
const theEntry = myDictionary.loadEntry('English');
console.log(theEntry[Utilities.getKey('New Norwegian')].translation); // = engelsk, engelsken
console.log(theEntry[Utilities.getKey('New Norwegian')].grammar); // = Noun, Masculine
Create a ordbok.json
in your project to register custom plugins for the
assembling process. You can specify node modules and folders:
{
"plugins": [
"@ordbok/index-plugin",
"../tools/custom-plugin"
]
}
If you like to create a custom plugin yourself, create a folder or package with
a ordbok-plugin.js
file somewhere inside. Here is how the corresponding
TypeScript file looks like:
const { IMarkdownPage, IPlugin, Markdown } = require('@ordbok/core/internals');
export const ordbokPlugin: IPlugin = {
onAssembling: (sourceFolder: string, targetFolder: string) => {},
onReadFile: (sourceFile: string, markdown: Markdown) => {},
onWriteFile: (targetFile: string, markdownPage: IMarkdownPage) => {},
onAssembled: () => {}
};
FAQs
Dictionary system
The npm package @ordbok/core receives a total of 0 weekly downloads. As such, @ordbok/core popularity was classified as not popular.
We found that @ordbok/core 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.