Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

unhal

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unhal

Takes JSON in hal format, and flattens it

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

unhal

Take JSON in HAL format, and canonize it back to a normal JSON object, without the _links and _embedded properties. See http://stateless.co/hal_specification.html for details.

As a command-line tool

Install with npm install -g unhal and then you can pipe JSON through it as a command.

unhal < test.json

As a library

const unhal = require('unhal')

const json = {
  _links: "this will be removed"
  _embedded: {
    foo: "this will be hoisted"
  }
}

const result = unhal(json)

This should result in:

{
  foo: "this will be hoisted"
}

Keywords

hal

FAQs

Package last updated on 03 Apr 2018

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