Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
kennitala
Advanced tools
Readme
A validator and general utility for Icelandic kennitölur in Javascript
####Installation with npm:
$ npm install kennitala
####Installation with bower:
$ bower install kennitala
Compatible with CommonJS, AMD modules, regular Javascript.
Pull requests welcome
var kennitala = require('kennitala');
kennitala.clean('310896DIRTYSSID2099'); // '3108962099'
kennitala.clean(3108962099); // '3108962099'
kennitala.isPerson('3108962099'); // True
kennitala.isPerson('310896-2099'); // True
kennitala.isPerson(3108962099); // True
kennitala.isPerson('31^_^08!!96LOL20T_T99'); // True
kennitala.isCompany('6010100890'); // True
kennitala.isCompany('601010-0890'); // True
kennitala.isCompany(6010100890); // True
kennitala.clean([string, int]);
returns string
Ensures datatype is string, then matches and removes all non-digit characters. Does not ensure the remaining string is 10 characters
kennitala.isPerson([string, int]);
returns boolean
Checks if kennitala checksum is correct and if day of birth is between 1-31
If passed a string with non-digit characters included it removes them before validating
kennitala.isCompany([string, int]);
returns boolean
Checks if kennitala checksum is correct and if day of birth is between 41-71
If passed a string with non-digit characters included it removes them before validating
Uses Mocha for testing. In order to execute the tests, you need to run npm install -g mocha
first. Once you've done that
you can open up a command line and point it to the root directory of the project. From there you should be able to type either npm test
or simply mocha
to run the tests.
To build the project, you can type npm run dist
, which minifies the script and generates a source map, and places both in the dist/
folder.
Kennitala generator, for both people and companies
FAQs
Icelandic social security number (kennitölur) utilities for servers and clients
The npm package kennitala receives a total of 2,859 weekly downloads. As such, kennitala popularity was classified as popular.
We found that kennitala demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.