New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lineate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lineate

Prints objects in object illiteral form

  • 9000.0.3
  • latest
  • Source
  • npm
  • Socket score

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

lineate

Prints objects in object illiteral form

Get it:

npm install lineate

Usage:

var lineate = require('lineate');

lineate({
	"id": "0001",
	"type": "donut",
	"name": "Cake",
	"ppu": 0.55,
	"batters":
		{
			"batter":
				[
					{ "id": "1001", "type": "Regular" },
					{ "id": "1002", "type": "Chocolate" },
					{ "id": "1003", "type": "Blueberry" },
					{ "id": "1004", "type": "Devil's Food" }
				]
		},
	"topping":
		[
			{ "id": "5001", "type": "None" },
			{ "id": "5002", "type": "Glazed" },
			{ "id": "5005", "type": "Sugar" },
			{ "id": "5007", "type": "Powdered Sugar" },
			{ "id": "5006", "type": "Chocolate with Sprinkles" },
			{ "id": "5003", "type": "Chocolate" },
			{ "id": "5004", "type": "Maple" }
		]
});

Output:

root.id = "0001"
root.type = "donut"
root.name = "Cake"
root.ppu = 0.55
root.batters = {}
root.batters.batter = []
root.batters.batter[0] = {}
root.batters.batter[0].id = "1001"
root.batters.batter[0].type = "Regular"
root.batters.batter[1] = {}
root.batters.batter[1].id = "1002"
root.batters.batter[1].type = "Chocolate"
root.batters.batter[2] = {}
root.batters.batter[2].id = "1003"
root.batters.batter[2].type = "Blueberry"
root.batters.batter[3] = {}
root.batters.batter[3].id = "1004"
root.batters.batter[3].type = "Devil's Food"
root.topping = []
root.topping[0] = {}
root.topping[0].id = "5001"
root.topping[0].type = "None"
root.topping[1] = {}
root.topping[1].id = "5002"
root.topping[1].type = "Glazed"
root.topping[2] = {}
root.topping[2].id = "5005"
root.topping[2].type = "Sugar"
root.topping[3] = {}
root.topping[3].id = "5007"
root.topping[3].type = "Powdered Sugar"
root.topping[4] = {}
root.topping[4].id = "5006"
root.topping[4].type = "Chocolate with Sprinkles"
root.topping[5] = {}
root.topping[5].id = "5003"
root.topping[5].type = "Chocolate"
root.topping[6] = {}
root.topping[6].id = "5004"
root.topping[6].type = "Maple"

lineate(...) can also take multiple arguments. It will lineate all of them, seperated by newline!

Happy hacking.

FAQs

Package last updated on 18 Aug 2012

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