2.0.0 • Published 9 months ago

@igor.dvlpr/zing v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

✨ 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

@igor.dvlpr/keppo

🎡 Parse, manage, compare and output SemVer-compatible version numbers. 🛡

@igor.dvlpr/extendable-string

🦀 ExtendableString allows you to create strings on steroids that have custom transformations applied to them, unlike common, plain strings. 🪀

@igor.dvlpr/normalized-string

💊 NormalizedString provides you with a String type with consistent line-endings, guaranteed. 📮

@igor.dvlpr/comment-it

📜 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. 💻

@igor.dvlpr/duoscribi

✒ DúöScríbî allows you to convert letters with diacritics to regular letters. 🤓