Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/igorskyflyer/npm-zing

🐌 Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments - composite formatting. πŸš€
https://github.com/igorskyflyer/npm-zing

back-end biome c-style cs csharp formatter igorskyflyer javascript js npm print printf string system utility vitest zing

Last synced: 2 months ago
JSON representation

🐌 Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments - composite formatting. πŸš€

Awesome Lists containing this project

README

        

# Zing



🐌 Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments - composite formatting, more information composite formatting An external link. πŸš€








πŸ’– Support further development


I work hard for every project, including this one and your support means a lot to me!


Consider buying me a coffee. β˜•


Thank you for supporting my efforts! πŸ™πŸ˜Š





Donate to igorskyflyer




@igorskyflyer








## πŸ•΅πŸΌ Usage

Install it by executing:

```shell
npm i "@igor.dvlpr/zing"
```


## 🀹🏼 API

```ts
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](https://docs.microsoft.com/en-us/dotnet/standard/base-types/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`.

---

## πŸ“ Changelog

> ✨ Changelog is available here: [CHANGELOG.md](https://github.com/igorskyflyer/npm-zing/blob/main/CHANGELOG.md).

---

## πŸͺͺ License

Licensed under the MIT license which is available here, [MIT license](https://github.com/igorskyflyer/npm-zing/blob/main/LICENSE).

---

## 🧬 Related

[@igor.dvlpr/recursive-readdir](https://www.npmjs.com/package/@igor.dvlpr/recursive-readdir)

> _πŸ“– Provides recursive readdir() and readdirSync() functions. πŸ“_


[@igor.dvlpr/regkeys](https://www.npmjs.com/package/@igor.dvlpr/regkeys)

> _πŸ“š An npm package for fetching Windows registry keys. πŸ—_


[@igor.dvlpr/jmap](https://www.npmjs.com/package/@igor.dvlpr/jmap)

> _πŸ•ΆοΈ Reads a JSON file into a Map. 🌻_


[@igor.dvlpr/unc-path](https://www.npmjs.com/package/@igor.dvlpr/unc-path)

> _πŸ₯½ Provides ways of parsing UNC paths and checking whether they are valid. 🎱_


[@igor.dvlpr/scrollend-polyfill](https://www.npmjs.com/package/@igor.dvlpr/scrollend-polyfill)

> _πŸ›΄ A performant and light (< 1KB) JavaScript polyfill for the scrollend Event. ⛸️_




Provided by **Igor Dimitrijević** ([*@igorskyflyer*](https://github.com/igorskyflyer/)).