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

hxini

v0.0.2

Published

hxIni is a fast, light and simple library to read and write INI files, using hashes.

Downloads

4

Readme

hxIni

1. Introduction

hxIni is a fast, light and simple library to read and write INI files, using hashes.

Checkout wikipedia for more information about INI Files.

2. Install

Use haxelib to install the release version of the library (if avaliable):

> haxelib install hxIni

Otherwise, you can download this repository as a zip from GitLab (you can try this link), and use the local installer from haxelib:

> haxelib local hxini-23e2b4(...).zip

Also, don't forget to add

<haxelib name="hxIni" />

to your xml project file, or, for a standard Haxe project, add

-l hxini

in your hxml build file.

3. Usage

Let's explain this with an example. Imagine you have this example.ini file:

; - example.ini
; last modified 1 April 2001 by John Doe
[owner]
name=John Doe
organization=Acme Widgets Inc.
 
[database]
; use IP address in case network name resolution is not working
server=192.0.2.62 
port=143
file="payroll.dat"

There we have two sections (owner and database), and each one has its own parameters ([name, organization] and [server, port, file]).

Now, to parse this with hxIni, we must create an Ini object with IniManager class:

var ini: Ini = IniManager.LoadFromFile("example.ini");

Or, if you have that stored in a String, you can use:

var ini: Ini = IniManager.LoadFromString(str_data);

And, the access to parameters it's pretty simple. Imagine a map of maps, so a section if linked to a map of parameters, and you can access like this:

var name = ini["owner"]["name"];

Finally, you can transform them to a string (after modifications), or save it to a file:

IniManager.WriteToFile(ini, "test.ini");
trace( IniManager.toString(ini) );

Also, don't forget to import the classes!

import hxIni.IniManager;
import hxIni.IniManager.Ini;

4. Rules

  1. Comments will be ignored.
  2. Every parameter must belong to at least one section.
  3. If a parameter with an used name is found on the same section, it will be replaced.
  4. If no section is declared, the Global section will be used by default (IniManager.GLOBAL_SECTION).
  5. If a white line (not comment) is found, then the following parameters, unless a section is declared, will belong to the Global section.
  6. UTF-8 is usable, but not recommend.
  7. You can use Escaped characters.
  8. Parameters keys and values are case sensitive.
  9. ...

5. Authors

This project has been made by:

| Avatar | Name | Nickname | Email | | ------- | ------------- | --------- | ------------------ | | | Daniel Herzog | Wikiti | [email protected]

6. Links