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

sid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

sid

Simple data description language

unpublished
latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Background

SID is a simple hierarchial data definition language. I created it just for simplifying the data normally entered in JSON-format.

It is very lightweight: code is less than 80 lines of CoffeeScript and it has no dependencies to other modules.

Install

Installation using Node Package Manager.

Run the following under your application directory:

npm install sid

Overview

Item in SID contains a name, value and children. Value can be anything that is a valid Javascript expression.

Items are specified hierarchially using indentation.

For example (in CoffeeScript):

{ parse } = require 'sid'
data = """
  person
    name 'John Doe'
    address
      street 'W 38th St 412'
      code 94823
      town 'New York'
    address
      street 'Chestnut St 12'
      code 52362
      town 'San Francisco'
"""
console.log JSON.stringify parse(data), null, '  '

Above code would print:

[
  {
    "name": "person",
    "children": [
      {
        "name": "name",
        "value": "John Doe"
      },
      {
        "name": "address",
        "children": [
          {
            "name": "street",
            "value": "W 38th St 412"
          },
          {
            "name": "code",
            "value": 94823
          },
          {
            "name": "town",
            "value": "New York"
          }
        ]
      },
      {
        "name": "address",
        "children": [
          {
            "name": "street",
            "value": "Chestnut St 12"
          },
          {
            "name": "code",
            "value": 52362
          },
          {
            "name": "town",
            "value": "San Francisco"
          }
        ]
      }
    ]
  }
]

FAQs

Package last updated on 22 Mar 2013

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