New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

naml

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

naml

Not Another Markup Language

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

  • Simple, unified API.
  • Freely convert between:

    • JSON (JavaScript Object Notation): .json
    • HJSON (Human JSON): .hjson
    • JSON5 (ES5 JSON): .json5
    • CSON (CoffeeScript Object Notation): .cson
    • YAML (Yet Another Markup Language): .yaml
    • TOML (Tom's Obvious, Minimal Language): .toml
    • INI (Initialization File Format): .ini

Installation

npm install naml

CLI

naml [input-file] [output-file]

Example: naml path/to/input.yaml path/to/output.json

API

const NAML = require('naml')

NAML.parse(string, type)

  • string {String}: the String to be parsed
  • type {String}: the input type; one of the following: json, hjson, json5, cson, yaml, toml, ini (may be prefixed with a .)
  • returns {Object}: the resulting Object
  • throws {Error}: if parsing failed

NAML.stringify(object, type)

  • object {Object}: the Object to be stringified
  • type {String}: the input type; one of the following: json, hjson, json5, cson, yaml, toml, ini (may be prefixed with a .)
  • returns {String}: the resulting String
  • throws {Error}: if stringifying failed

License

WTFPL – Do What the F*ck You Want to Public License.

Made with :heart: by @MarkTiedemann.

Keywords

naml

FAQs

Package last updated on 26 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts