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 🙏

© 2025 – Pkg Stats / Ryan Hefner

iml

v0.2.5

Published

Indentation Markup Language

Downloads

8

Readme

iml-js : IML Javascript Parser

Forum

Give your opinion about IML on the forum: http://628906.xobor.com/f3-IML.html

Changelog

07/05/14

  • Add js2iml to convert javascript to iml
  • Add Unit tests for js2iml

07/02/14

  • Unit tests : tap npm test to launch tests
  • Tabulation : 1 tabulation equals to 4 spaces character

What is IML ?

IML means " Indentation Markup Language " because the indentation delimits elements informations area.

The main objective is to have the most simplified syntax than others in order to describe data easily. An IML file must be comprehensive and editable by any human.

This syntax permits to describe the same data structure than JSON or YAML, but in a simplified way.

And why not YAML ?

The IML syntax is similar to YAML syntax, but IML is more easy to edit with less pitfalls :

  • we have not to add : at the end of each map keys
  • we have not to add a tiret - before each element of a list : only one line with a tiret - at the beginning of the list indicates that all children elements are in this list
  • multilines are easy to define with > symbol before the first line with no break line after it
My recipes
  -
    Best Chocolate Chip Cookies
      Ingredients
        -
          1 cup butter
          1 cup white sugar
          1 cup packed bown brown sugar
          2 eggs
          2 teaspoons vanilla extract
          1 teaspoon baking soda
          2 teaspoons hot water
          1/2 teaspoon salt
          2 cups semisweet chocolate
          1 cup chopped walnuts
      Preparation
        -
          > Preheat oven to 350 degrees F (175 degrees C)
          > Cream together the butter, white sugar, and brown sugar until smooth. 
            Beat in the eggs one at a time, then stir in the vanilla. Dissolve 
            baking soda in hot water. Add to batter along with salt. Stir in flour, 
            chocolate chips, and nuts. Drop by large spoonfuls onto ungreased pans.
          > Bake for about 10 minutes in the preheated oven, or until edges are 
            nicely browned.

`` My recipes Best Chocolate Chip Cookies Ingredients 1 cup butter

      1 cup white sugar

      1 cup packed bown brown sugar

      2 eggs

      2 teaspoons vanilla extract

      1 teaspoon baking soda

      2 teaspoons hot water

      1/2 teaspoon salt

      2 cups semisweet chocolate

      1 cup chopped walnuts

  Preparation
        Preheat oven to 350 degrees F (175 degrees C)

        Cream together the butter, white sugar, and brown sugar until smooth.
        Beat in the eggs one at a time, then stir in the vanilla. Dissolve
        baking soda in hot water. Add to batter along with salt. Stir in flour,
        chocolate chips, and nuts. Drop by large spoonfuls onto ungreased pans.

        Bake for about 10 minutes in the preheated oven, or until edges are
        nicely browned.

IML syntax is described in the README file of the IML project : 
https://github.com/lchaboud/iml/blob/master/SYNTAX.md

You can see a comparison between IML and YAML and JSON here :
https://github.com/lchaboud/iml/blob/master/SAMPLE.md

How To
===

Convert Javascript data to IML
---
```js
var iml = require('iml');
var data = ... // Javascript data
var imlContent = iml.js2iml(data);

Convert IML to Javascript data

var iml = require('iml');
var data = iml.iml2js("iml content ...");

Read IML file to Javascript data

var iml = require('iml');
var fs = require('fs');
var path = require('path');

var filename = "data.iml";
var fileContent = fs.readFileSync(path.join(process.cwd(), filename), 'utf8');

var data = iml.iml2js(fileContent);

console.log(data);

Write Javascript data in IML file

var iml = require('iml');
var fs = require('fs');
var path = require('path');

var data = ... ; // Javascript data
var imlContent = iml.js2iml(data);

var filename = "data2.iml";
fs.writeFileSync(path.join(process.cwd(), filename), imlContent, 'utf8');

Sample project

You can get a sample project here : https://github.com/lchaboud/iml-js/tree/master/sample