
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
Dotlang is a simple library for easily parsing and reading .lang files.
$ npm i dotlang
See the methods for more usage info.
const dotlang = require('dotlang')
const parsedFile = dotlang.parse("path/to/file.lang")
console.log(parsedFile)
const dotlang = require('dotlang')
const parsedFile = dotlang.parseMultiple(["path/to/file.lang", "path/to/anotherFile.lang"])
console.log(parsedFile)
const dotlang = require('dotlang')
const parsedFile = dotlang.parseDir("path/to/dir")
console.log(parsedFile) // Map(int) => { 'key' => 'value' }
path: string): Map<string, string>parses dotlang file and returns a map fo keys values.
| Parameters | Type | Description |
|---|---|---|
path | string | Path to .lang file |
const parsed = dotlang.parse("path/to/file.lang")
console.log(parsed) // Map(int) => { 'fileName' => Map(int) { 'key' => 'value' } }
paths: string[]): Map<string, Map<string, string>>Parses multiple dotlang files and returns a map of file names with their corresponding keys/values
| Parameters | Type | Description |
|---|---|---|
path | string[] | Array of .lang file paths |
const parsed = dotlang.parseMultiple(["path/to/file.lang", "path/to/anotherFile.lang"])
console.log(parsed) // Map(int) => { 'fileName' => Map(int) { 'key' => 'value' } }
dir: string): Map<string, Map<string, string>>Finds all lang files in specified dir and returns a map of file names with their corresponding keys/values
| Parameters | Type | Description |
|---|---|---|
dir | string | Path to directory |
const parsed = dotlang.parseDir("/path/to/dir")
console.log(parsed)
orig: string, ...replacements: any[]): stringReplaces templates in given string and return new string
| Parameters | Type | Description |
|---|---|---|
orig | string | Orignal string with %s templates |
...replacements | any[] | List of replacements |
const str = "Hi my name is %s and I like %s"
const newStr = dotlang.replaceTemplates(str, "Nobu", "pizza")
console.log(newStr) // Hi my name is Nobu and I like pizza
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
dotlang is a file parser for .lang files
We found that dotlang 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.