Finnish Business ID (Y-tunnus) validation and creation
This module provides functions to validate and create Finnish Business IDs (Y-tunnus). A Finnish Business ID consists of seven digits, a hyphen, and a checksum digit (e.g., 1234567-1).
console.log(isValidBusinessId('1572860-0'));
console.log(buildBusinessId('1572860'));
<html>
<head></head>
<body>
<script type="module">
import {buildBusinessId, isValidBusinessId} from 'https://unpkg.com/mharj-fi-business-id@latest/dist/index.mjs';
console.log(isValidBusinessId('1572860-0'));
console.log(buildBusinessId('1572860'));
</script>
</body>
</html>