npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ini-merge

v1.0.2

Published

INI cli-tool for merging multiple files into one

Downloads

5

Readme

ini-merge

Installation

npm install --global ini-merge

Usage

ini-merge input.ini output.ini

Examples

Merging sections

input.ini

[list]
1=a
2=b

[list]
3=c
4=d

output.ini

[list]
1=a
2=b
3=c
4=d

Auto generated keys

input.ini

[list]
1=a
2=b
*=c
*=d

[list]
*=e
*=f

output.ini

[list]
1=a
2=b
3=c
4=d
5=e
6=f

Importing other files / Splitting large file to multiple files

input.ini

;#import part1.ini
;#import part2.ini

part1.ini

[part1]
key=value

part1.ini

[part2]
key=value

output.ini

[part1]
key=value

[part2]
key=value

Defining variables

input.ini

;@v1 100
;@v2 200

[data]
v1=@v1
v2=@v2
v3=@v1 and @v2

output.ini


[data]
v1=100
v2=200
v3=100 and 200

Using @current variable

input.ini

[section1]
data=1

[section2]
; the key 'data' does not present

; overwrite of section1
[section1]
data=@current,2

;overwrite of section2
[section2]
data=@current,2

output.ini

[section1]
data=1,2

[section2]
; no comma before '2'
data=2

Appending section name as a key of another section

input.ini

[list]
1=item1
2=item2

[item3]
;#appendTo list

[item4]
;#appendTo list

output.ini

[list]
1=item1
2=item2
3=item3
4=item4

Removing specified section keys

input.ini

[data]
key1=1
key2=2
key3=3

[data]
;#remove key1,key3
key4=4

output.ini

[data]
key2=2
key4=4

Removing all section keys

input.ini

[data]
key1=1
key2=2
key3=3

[data]
;#remove *
key4=4

output.ini

[data]
key4=4

Ignoring section rendering

input.ini

[data]
;#virtual
key=value

output.ini

; section 'data' does not render

Extending sections

input.ini

[section1]
key1=1
key2=2

[section2]
; using #virtual to hide this section
;#virtual
key1=2;
key3=3
key4=4

[section3]
;#extends section1,section2
; overwrite key4
key4=5

output.ini

[section1]
key1=1
key2=2

[section3]
key1=2
key2=2
key3=3
key4=5

Creating and applying template

input.ini

; global variable
;@param3 3

[my-template]
; indicate this section acts like template and the template has 2 params
; templated section will not render to output
;#template param1,param2
key1=@param1
key2=@param2
key3=@param3

[use-case-1]
; apply template with specified params
;#apply my-template @begin
param1=p1
param2=p2
;@end


[use-case-2]
; apply template with specified params
;#apply my-template @begin
param1=p1
; no param2
;@end


[use-case-3]
; apply template with no param
;#apply my-template

output.ini

[use-case-1]
key1=p1
key2=p2
key3=3

[use-case-2]
key1=p1
key2=
key3=3

[use-case-3]
key1=
key2=
key3=3

Using conditional block

Dynamic section name

input.ini

;@section-name MySection
[@section-name]

output.ini

[MySection]