fi-business-id
Finnish Business ID (Y-tunnus) validation and creation
javascript/typescript module
console.log(isValidBusinessId('1572860-0'));
console.log(buildBusinessId('1572860'));
Browser UMD (All browsers)
<html>
<head>
<script crossorigin="anonymous" src="https://unpkg.com/mharj-fi-business-id@0.0.5/dist/umd/index.js"></script>
</head>
<body>
<script>
console.log(FiBusinessId.isValidBusinessId('1572860-0'));
console.log(FiBusinessId.buildBusinessId('1572860'));
</script>
</body>
</html>
Browser ESM (Modern browsers)
<html>
<head></head>
<body>
<script type="module">
import {buildBusinessId, isValidBusinessId} from 'https://unpkg.com/mharj-fi-business-id@0.0.5/dist/esm/index.js';
console.log(isValidBusinessId('1572860-0'));
console.log(buildBusinessId('1572860'));
</script>
</body>
</html>