jml-format
TypeScript icon, indicating that this package has built-in type declarations

1.1.9 • Public • Published

Author(s)/Creator(s)

jml

JML is a custom file format like json, bson or yaml.

To get started :

  • At first, JML works with spaces, symbols & you don't need to put double quotes!
  • Aswell as always this is just the beta of jml file format, more updates is comming soon!

Example code for .jml file :

spacing is avaliable | this is spacing
$ymbols? | $ymb0ls & numb3r$ 4r3 w0rk1ng

Example code in typescript :

import { initJMLFile, indexJMLFile, getFromJML } from "jml-format";
import path from "path";

const fpath = path.join(__dirname + "/conf.jml");

(async () => {
    var s: any;

    // 👇 Await here is necessary, Or it wont initialize the JML File,
    // 👇 Await is required to skip using "setTimeout()".
    await initJMLFile(fpath).then( ( ) => s = indexJMLFile() );

    console.log(getFromJML(s.list.items, "spacing is avaliable"));
    console.log(getFromJML(s.list.items, "$ymbols?"));
})();

Output:

  • this is spacing
    
  • $ymb0ls & numb3r$ 4r3 w0rk1ng
    

Pros & cons :

jml works with :

  • spacing
  • numbers
  • symbols

jml can not work with :

  • more than space after you finished the field or value, Like :

  • GOOD 👇:
    
  •  this is a test | yep!
    
  • BAD 👇:
    
  •  this is a test     |     yep!
    
  • no ability to put comments (Working on it)

Package Sidebar

Install

npm i jml-format

Weekly Downloads

4

Version

1.1.9

License

ISC

Unpacked Size

7.11 kB

Total Files

8

Last publish

Collaborators

  • hz-rd