Tag javascript

npm whatwg-fetch

The fetch() function is a Promise-based mechanism for programatically making web requests in the browser. This project is a polyfill that implements a subset of the standard Fetch specification, enough to make fetch a viable replacement for most uses of…

Read More

Javascript CNP Validator

Use the following function to validate your CNP string: /** * Validate CNP * @param {string} value CNP * @returns {boolean} Valid or not */ function validateCNP (value) { var re = /^\d{1}\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])(0[1-9]|[1-4]\d| 5[0-2]|99)\d{4}$/, bigSum = 0, rest = 0,…

Read More