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

object-treeify

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-treeify - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

4

lib/index.js

@@ -25,3 +25,3 @@ const assert = require('assert');

const sort = input => ctx.sortFn === null ? input : input.sort((a, b) => ctx.sortFn(b, a));
const sort = input => ctx.sortFn === null ? input.reverse() : input.sort((a, b) => ctx.sortFn(b, a));

@@ -46,2 +46,2 @@ const neighbours = [];

};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJhc3NlcnQiLCJyZXF1aXJlIiwiYnVpbGRDdHgiLCJvcHRzIiwiY3R4IiwiT2JqZWN0IiwiYXNzaWduIiwiam9pbmVkIiwic3BhY2VyTm9OZWlnaGJvdXIiLCJzcGFjZXJOZWlnaGJvdXIiLCJrZXlOb05laWdoYm91ciIsImtleU5laWdoYm91ciIsInNvcnRGbiIsIm1vZHVsZSIsImV4cG9ydHMiLCJ0cmVlIiwicmVzdWx0Iiwic29ydCIsImlucHV0IiwiYSIsImIiLCJuZWlnaGJvdXJzIiwia2V5cyIsIm1hcCIsImsiLCJsb29rdXAiLCJsZW5ndGgiLCJrZXkiLCJwb3AiLCJub2RlIiwicHVzaCIsInNsaWNlIiwibiIsImpvaW4iLCJpbmNsdWRlcyIsIkFycmF5IiwiaXNBcnJheSIsImNvbmNhdCJdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTUEsTUFBTSxHQUFHQyxPQUFPLENBQUMsUUFBRCxDQUF0Qjs7QUFFQSxNQUFNQyxRQUFRLEdBQUlDLElBQUQsSUFBVTtBQUN6QixRQUFNQyxHQUFHLEdBQUdDLE1BQU0sQ0FBQ0MsTUFBUCxDQUFjO0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H1cbiAgfVxuXG4gIHJldHVybiBjdHguam9pbmVkID09PSB0cnVlID8gcmVzdWx0LmpvaW4oJ1xcbicpIDogcmVzdWx0O1xufTtcbiJdfQ==
{
"name": "object-treeify",
"version": "1.1.3",
"version": "1.1.4",
"description": "Stringify Object as tree structure",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -17,9 +17,9 @@ # object-treeify

oranges: {
'mandarin': { ├─ apples,
clementine: null, │ ├─ pink lady
tangerine: 'so cheap and juicy!' -=> │ └─ gala
} └─ oranges
}, └─ mandarin
apples: { ├─ tangerine: so cheap and juicy!
'gala': null, └─ clementine
'mandarin': { ├─ oranges
clementine: null, │ └─ mandarin
tangerine: 'so cheap and juicy!' -=> │ ├─ clementine
} │ └─ tangerine: so cheap and juicy!
}, └─ apples
apples: { ├─ gala
'gala': null, └─ pink lady
'pink lady': null

@@ -58,9 +58,9 @@ }

// =>
// ├─ apples
// │ ├─ pink lady
// │ └─ gala
// └─ oranges
// └─ mandarin
// ├─ tangerine: so cheap and juicy!
// └─ clementine
// ├─ oranges
// │ └─ mandarin
// │ ├─ clementine
// │ └─ tangerine: so cheap and juicy!
// └─ apples
// ├─ gala
// └─ pink lady
```

@@ -67,0 +67,0 @@

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