From b0bca9a1158a9596ec51a0404a6a8272b70ee204 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 20 Oct 2023 13:28:36 -0700 Subject: [PATCH] [readme] update readme from default branch --- readme.markdown | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/readme.markdown b/readme.markdown index e8976f4..6fbb643 100644 --- a/readme.markdown +++ b/readme.markdown @@ -1,13 +1,15 @@ -# deep-equal +# deep-equal [![Version Badge][npm-version-svg]][package-url] -Node's `assert.deepEqual() algorithm` as a standalone module. +Node's `assert.deepEqual() algorithm` as a standalone module, that also works in browser environments. -This module is around [5 times faster](https://gist.github.com/2790507) -than wrapping `assert.deepEqual()` in a `try/catch`. +It mirrors the robustness of node's own `assert.deepEqual` and is robust against later builtin modification. -[![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal) +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] -[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal) +[![npm badge][npm-badge-png]][package-url] # example @@ -33,16 +35,14 @@ var deepEqual = require('deep-equal') ## deepEqual(a, b, opts) -Compare objects `a` and `b`, returning whether they are equal according to a -recursive equality algorithm. +Compare objects `a` and `b`, returning whether they are equal according to a recursive equality algorithm. If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. -The default is to use coercive equality (`==`) because that's how -`assert.deepEqual()` works by default. +The default is to use coercive equality (`==`) because that's how `assert.deepEqual()` works by default. # install -With [npm](http://npmjs.org) do: +With [npm](https://npmjs.org) do: ``` npm install deep-equal @@ -50,8 +50,24 @@ npm install deep-equal # test -With [npm](http://npmjs.org) do: +With [npm](https://npmjs.org) do: ``` npm test ``` + +[package-url]: https://npmjs.org/package/deep-equal +[npm-version-svg]: https://versionbadg.es/inspect-js/deep-equal.svg +[deps-svg]: https://david-dm.org/inspect-js/node-deep-equal.svg +[deps-url]: https://david-dm.org/inspect-js/node-deep-equal +[dev-deps-svg]: https://david-dm.org/inspect-js/node-deep-equal/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/node-deep-equal#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/deep-equal.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/deep-equal.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/deep-equal.svg +[downloads-url]: https://npm-stat.com/charts.html?package=deep-equal +[codecov-image]: https://codecov.io/gh/inspect-js/node-deep-equal/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/node-deep-equal/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/node-deep-equal +[actions-url]: https://github.com/inspect-js/node-deep-equal/actions