UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

16 lines (15 loc) 628 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.eq = eq; const _operator_ts_1 = require("../_helpers/_operator.js"); function eq(a, b) { // discuss at: https://locutus.io/python/operator/eq/ // parity verified: Python 3.12 // original by: Kevin van Zonneveld (https://kvz.io) // note 1: Performs Python-style value equality for plain scalar, array, and object values. // example 1: eq([1, 2], [1, 2]) // returns 1: true // example 2: eq(1, true) // returns 2: true return (0, _operator_ts_1.pythonEqual)(a, b); }