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

human-object-diff

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

human-object-diff

Human Readable Difference Between Two Objects

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
increased by113.71%
Maintainers
1
Weekly downloads
 
Created
Source

human-object-diff

build status code coverage code style styled with prettier made with lass license npm downloads

Configurable Human Readable Difference Between Two Plain Objects

Table of Contents

Install

npm:

npm install human-object-diff

yarn:

yarn add human-object-diff

Usage

const humanDiff = require('human-object-diff');

const lhs = { foo: 'bar' };
const rhs = { foo: 'baz' };
const options = {};

const diff = humanDiff(lhs, rhs, options);

console.log(humanObjectDiff.renderName());
// -> ['Foo", with a value of "bar" (at Obj.foo) was changed to "baz"']

Support for Dates

human-object-diff uses date-fns format function under the hood to show human readable date differences. We also supply a dateFormat option where you can supply your own date formatting string. Please note, that date-fns format strings are different from moment.js format strings. Please refer to the documentation here and here

Contributors

NameWebsite
Spencer Snyderhttp://spencersnyder.io/

License

MIT © Spencer Snyder

Keywords

FAQs

Package last updated on 23 Jan 2020

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