{"id":16567497,"url":"https://github.com/jdhitsolutions/mynumber","last_synced_at":"2025-09-11T17:07:48.737Z","repository":{"id":145020065,"uuid":"115746995","full_name":"jdhitsolutions/MyNumber","owner":"jdhitsolutions","description":"A demonstration PowerShell module of a class-based tool that creates a custom number object.","archived":false,"fork":false,"pushed_at":"2023-12-29T18:49:05.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T07:52:58.083Z","etag":null,"topics":["powershell","powershell-classes","powershell-module","powershell-scripting"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdhitsolutions.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-29T18:59:51.000Z","updated_at":"2023-12-29T18:45:11.000Z","dependencies_parsed_at":"2024-11-15T11:51:03.561Z","dependency_job_id":null,"html_url":"https://github.com/jdhitsolutions/MyNumber","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyNumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyNumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyNumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdhitsolutions%2FMyNumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdhitsolutions","download_url":"https://codeload.github.com/jdhitsolutions/MyNumber/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248663607,"owners_count":21141795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["powershell","powershell-classes","powershell-module","powershell-scripting"],"created_at":"2024-10-11T21:06:44.765Z","updated_at":"2025-04-13T04:31:52.321Z","avatar_url":"https://github.com/jdhitsolutions.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MyNumber\n\n:mortar_board: A demonstration class-based module that creates a *number* object. The functionality of the module isn't that practical. But it can serve as a model of how you might build a class-based PowerShell tool.\n\nThe module should work on Windows PowerShell and PowerShell 7, including cross-platform. It is intended for educational purposes.\n\nInstall the latest version from the PowerShell Gallery.\n\n```powershell\nInstall-Module MyNumber\n```\n\nYou can also use the `Microsoft.PowerShell.PSResourceGet` module.\n\n```powershell\nInstall-PSResource MyNumber -scope AllUsers\n```\n\nThe class is defined in [MyNumber.psm1](mynumber.psm1). Functionality is exposed through a set of functions.\n\n+ [New-MyNumber](/docs/New-MyNumber.md)\n+ [Set-MyNumber](/docs/Set-MyNumber.md)\n+ [Convert-MyNumber](/docs/Convert-MyNumber.md)\n\nThe module also includes custom format and type extensions. The examples shown below may not reflect these changes.\n\n\n```powershell\nPS C:\\\u003e $x = New-MyNumber 11\nPS C:\\\u003e $x\n\n\nNumber     : 11\nSquare     : 121\nCube       : 1331\nSqrt       : 3.3166247903554\nLog        : 2.39789527279837\nSine       : -0.999990206550703\nCosine     : 0.00442569798805079\nTangent    : -225.950846454195\nCircleArea : 380.132711084365\nInverse    : 0.0909090909090909\nIsEven     : False\nIsPrime    : True\nExp        : 59874.1417151978\nFactorial  : 39916800\nFactors    : {1, 11}\nCustom     : 0\n\nPS C:\\\u003e $x | Set-MyNumber -value 123\n\n\nNumber     : 123\nSquare     : 15129\nCube       : 1860867\nSqrt       : 11.0905365064094\nLog        : 4.81218435537242\nSine       : -0.459903490689591\nCosine     : -0.887968906691855\nTangent    : 0.517927471585655\nCircleArea : 47529.15525616\nInverse    : 0.00813008130081301\nIsEven     : False\nIsPrime    : False\nExp        : 2.61951731874906E+53\nFactorial  : 1.21463043670253E+205\nFactors    : {1, 3, 41, 123}\nCustom     : 0\n\nPS C:\\\u003e $x | Convert-MyNumber -ToHex\n7b\n\nPS C:\\\u003e Convert-MyNumber 1024 -ToBinary\n10000000000\n```\n\nYou can also create a number with a custom script block.\n\n```powershell\nPS C:\\\u003e New-MyNumber 77 -CustomScriptBlock {Param($x) [char][int]$x }\n\n\nNumber     : 77\nSquare     : 5929\nCube       : 456533\nSqrt       : 8.77496438739212\nLog        : 4.34380542185368\nSine       : 0.999520158580731\nCosine     : -0.0309750317312165\nTangent    : -32.2685757759344\nCircleArea : 18626.5028431339\nInverse    : 0.012987012987013\nIsEven     : False\nIsPrime    : False\nExp        : 2.75851345452317E+33\nFactorial  : 1.45183092028286E+113\nFactors    : {1, 7, 11, 77}\nCustom     : M\n```\n\nYou should include a parameter in your script block for the number value. It will be passed as an argument when calculating the value.\n\nYou can only access the class definition through the functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2Fmynumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdhitsolutions%2Fmynumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdhitsolutions%2Fmynumber/lists"}