Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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. π
- Host: GitHub
- URL: https://github.com/igorskyflyer/npm-zing
- Owner: igorskyflyer
- License: mit
- Created: 2022-08-18T02:40:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T22:56:05.000Z (6 months ago)
- Last Synced: 2024-09-16T18:39:07.606Z (4 months ago)
- Topics: back-end, biome, c-style, cs, csharp, formatter, igorskyflyer, javascript, js, npm, print, printf, string, system, utility, vitest, zing
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@igor.dvlpr/zing
- Size: 82 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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 . π
π 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! ππ
@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/)).