@nsis/mui-language-strings

0.3.0 • Public • Published

mui-language-strings

npm npm CircleCI David

Parser for NSIS Modern UI language headers

Installation

yarn add @nsis/mui-language-strings || npm install @nsis/mui-language-strings

Usage

Use ES6 imports or require() to include the module:

// ECMAScript Import
import { parse } from '@nsis/mui-language-strings';

// CommonJS Require
const { parse } = require('@nsis/mui-language-strings');

Example usage in script:

// Read an NSIS Language File
const languageFile = fs.readFileSync('Contrib/Language files/English.nsh', 'utf8');

const languageObj = parse(languageFile);

Methods

parse

Usage: parse(string, options)

Parses an NSIS Modern UI language header, constructing an object or JSON string that's easy to query

options.looseQuotes

Type: boolean

Ignores leading and trailing quotes of a language string. This option is useful to parse the Hindi language, which currently lacks one trailing quote.

options.minify

Type: boolean

Minifies a stringified object, requires options.stringify to be true

options.stringify

Type: boolean

Return a stringified object

License

This work is licensed under The MIT License

Donate

You are welcome to support this project using Flattr or Bitcoin 17CXJuPsmhuTzFV2k4RKYwpEHVjskJktRd

Package Sidebar

Install

npm i @nsis/mui-language-strings

Weekly Downloads

8

Version

0.3.0

License

MIT

Unpacked Size

21.5 kB

Total Files

6

Last publish

Collaborators

  • idleberg