Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

noon

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noon

'nother ordinary object notation

  • 0.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-92.39%
Maintainers
1
Weekly downloads
 
Created
Source

noon

'nother ordinary object notation

noon

module

noon = require 'noon'

# usage is similar to JSON 

noon.stringify { hello: 'world' }

# hello    world

noon.parse """
hello         world
what's up?    ☺
"""

# { hello: 'world', 'what\'s up?': '☺' }

stringify_options =  # stringify's second argument, defaults are: 
    indent:   4      # number of spaces per indent level
    align:    true   # vertically align object values
    maxalign: 32     # maximal number of spaces when aligning
    sort:     false  # sort object keys alphabetically
    circular: false  # check for circular references (expensive!)
    colors:   false  # colorize output with ansi colors
                     # custom dictionary or true for default colors:

 defaultColors =
     key:     chalk.bold.gray
     null:    chalk.bold.blue
     value:   chalk.bold.magenta
     string:  chalk.bold.white
     visited: chalk.bold.red

format

  • only spaces are allowed for indentation.
  • keys can have single spaces in them.
  • more than one space marks the end of a key.
  • dictionary values and list items are always trimmed.
  • dictionary values can contain longer space sequences.
  • list items can't contain more than one space in a row.
  • each list item is on it's own line.
  • a dot is used as a placeholder for objects and lists inside of lists.

caveats

This is in early alpha stadium and not meant to be completely foolproof.

Besides the limitations mentioned above, there are known issues with empty lists, empty objects and null values as well as potential conversions to strings when converting back and forth.

Don't expect your data to convert flawlessly!

Keywords

FAQs

Package last updated on 18 Dec 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc