Socket
Socket
Sign inDemoInstall

@sinonjs/samsam

Package Overview
Dependencies
3
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sinonjs/samsam

Value identification and comparison functions


Version published
Weekly downloads
5.2M
increased by12.26%
Maintainers
5
Install size
198 kB
Created
Weekly downloads
 

Package description

What is @sinonjs/samsam?

The @sinonjs/samsam package is a library designed for deep comparison and matching of objects, arrays, and other JavaScript data types. It is particularly useful in the context of testing, where developers need to assert the equality of complex objects and arrays.

What are @sinonjs/samsam's main functionalities?

Deep equality

This feature allows for the deep comparison of objects, arrays, and other complex data structures to determine if they are equal in structure and content.

const samsam = require('@sinonjs/samsam');
const obj1 = { a: 1, b: { c: 2 } };
const obj2 = { a: 1, b: { c: 2 } };
console.log(samsam.deepEqual(obj1, obj2)); // outputs: true

Match object properties

This functionality enables matching objects against specified criteria, useful for asserting the presence of certain properties or property values within an object.

const samsam = require('@sinonjs/samsam');
const obj = { a: 1, b: 2 };
console.log(samsam.match(obj, { a: 1 })); // outputs: true

Other packages similar to @sinonjs/samsam

Changelog

Source

5.3.1

  • 04e0faa Distribute package as source (Morgan Roderick)

    This library is not meant for writing end user applications or even for being used directly when writing tests. It is not meant to be loaded directly by browsers.

    Consumers of this package are assumed to use their own bundlers, should they need to bundle code for use in browsers or workers.

    Therefore, it is safe to distribute the package as source files and not bundle them up.

    This allows us to remove the bundler and its transitive dependencies, which reduces the maintenance burden of managing the library.

Released on 2021-01-13.

Readme

Source

samsam

CircleCI Coverage status Contributor Covenant

Value identification and comparison functions

Documentation: http://sinonjs.github.io/samsam/

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

Licence

samsam was released under BSD-3

FAQs

Last updated on 13 Jan 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc