{"id":32168395,"url":"https://github.com/ericentin/strict_comparison","last_synced_at":"2026-02-21T15:05:06.055Z","repository":{"id":57553816,"uuid":"41583770","full_name":"ericentin/strict_comparison","owner":"ericentin","description":"Strict numeric comparison for Elixir","archived":false,"fork":false,"pushed_at":"2015-08-29T06:59:24.000Z","size":128,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-13T01:50:53.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericentin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-29T06:50:11.000Z","updated_at":"2023-05-14T14:38:10.000Z","dependencies_parsed_at":"2022-09-26T18:51:04.827Z","dependency_job_id":null,"html_url":"https://github.com/ericentin/strict_comparison","commit_stats":null,"previous_names":["antipax/strict_comparison"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ericentin/strict_comparison","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericentin%2Fstrict_comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericentin%2Fstrict_comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericentin%2Fstrict_comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericentin%2Fstrict_comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericentin","download_url":"https://codeload.github.com/ericentin/strict_comparison/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericentin%2Fstrict_comparison/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-21T15:53:55.015Z","updated_at":"2026-02-21T15:05:06.050Z","avatar_url":"https://github.com/ericentin.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/antipax/strict_comparison.svg?branch=master)](https://travis-ci.org/antipax/strict_comparison)\n\nStrictComparison\n================\n\nStrict numeric comparison.\n\nIn Elixir (and Erlang), all terms are comparable. While this is useful in many situations, sometimes you want comparing anything but 2 numbers to be an error (or, in the case of function clauses, not a match).\n\nSimply:\n\n```elixir\nuse StrictComparison\n```\n\nand Elixir’s comparator functions (\u003c, \u003e, \u003c=, and \u003e=) will only allow numeric arguments within the current scope.\n\nIncludes a full test suite for both use in regular code and guards.\n\nAlso includes a benchmark (example results from my relatively modern laptop):\n\n```\nSettings:\n  duration:      1.0 s\n\n## StrictComparisonBench\n[02:40:05] 1/8: strict guard float\n[02:40:08] 2/8: strict guard\n[02:40:10] 3/8: strict comparison float\n[02:40:13] 4/8: strict comparison\n[02:40:15] 5/8: regular guard float\n[02:40:18] 6/8: regular guard\n[02:40:20] 7/8: regular comparison float\n[02:40:23] 8/8: regular comparison\n\nFinished in 19.25 seconds\n\n## StrictComparisonBench\nregular comparison           1000000   1.68 µs/op\nregular comparison float     1000000   2.06 µs/op\nstrict comparison            1000000   2.16 µs/op\nregular guard                1000000   2.16 µs/op\nregular guard float          1000000   2.21 µs/op\nstrict guard                 1000000   2.22 µs/op\nstrict guard float           1000000   2.33 µs/op\nstrict comparison float      1000000   2.50 µs/op\n```\n\nso it's a bit slower than the regular (non-strict) version. Note that each \"op\"\nin this case is sorting 50 pairs of random numbers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericentin%2Fstrict_comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericentin%2Fstrict_comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericentin%2Fstrict_comparison/lists"}