@igor.dvlpr/zing v2.0.0
✨ Zing
🐌 Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments, more information here. 🚀
💡 This module has been selected to be part of the Project NextWave, thus, it is
ESM-only
. For legacy, CommonJS usage, install the previous major release.
🕵🏼 Usage
Install it by executing:
npm i "@igor.dvlpr/zing"
🤹🏼 API
zing(value: string, ...args: any[]): string
Formats the provided string in a C# style format, i.e. adds the ability to use positional arguments, like seen with String.Format
in C#.
See Composite formatting.
value: string
=> The string to process that support positional parameters, i.e. zing('Hello {0} {1}', 'Igor', 'Dimitrijević')
would output Hello Igor Dimitrijević
.
The returned value is always a string
.
🪪 License
Licensed under the MIT license which is available here, MIT license.
🧬 Related
🎡 Parse, manage, compare and output SemVer-compatible version numbers. 🛡
🦀 ExtendableString allows you to create strings on steroids that have custom transformations applied to them, unlike common, plain strings. 🪀
💊 NormalizedString provides you with a String type with consistent line-endings, guaranteed. 📮
📜 Formats the provided string as a comment, either a single or a multi line comment for the given programming language. 40 languages are currently supported. 💻
✒ DúöScríbî allows you to convert letters with diacritics to regular letters. 🤓