| sizeFormatter = new Intl.NumberFormat([], { | |
| style: "unit", | |
| unit: "byte", | |
| notation: "compact", | |
| unitDisplay: "narrow", | |
| }); | |
| (_bytes) => { | |
| const units = { B: " bytes", KB: " kb", MB: " mb", GB: " gb", TB: " tb" }; | |
| const parts = sizeFormatter.formatToParts(_bytes); |
Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.
It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
| /** | |
| * validates UEN of businesses in Singapore | |
| * https://www.uen.gov.sg/ueninternet/faces/pages/admin/aboutUEN.jspx | |
| * @param {string} uen | |
| * @returns {boolean} | |
| */ | |
| function validateUEN (uen) { | |
| var debug = true; | |
| const entityTypeIndicator = [ | |
| 'LP', 'LL', 'FC', 'PF', 'RF', 'MQ', 'MM', 'NB', 'CC', 'CS', 'MB', 'FM', 'GS', 'GA', |
| # Assume we are in your home directory | |
| cd ~/ | |
| # Clone the repo from GitLab using the `--mirror` option | |
| $ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git | |
| # Change into newly created repo directory | |
| $ cd ~/my-repo.git | |
| # Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
| Use: for testing against email regex | |
| ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses | |
| List of Valid Email Addresses | |
| email@example.com | |
| firstname.lastname@example.com | |
| email@subdomain.example.com | |
| firstname+lastname@example.com |
This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].
We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.
Each commit message consists of a header, a body, and a footer.