This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run yarn audit and only exit 0 on critical vulnerabilities (greater than 8) | |
// https://github.com/yarnpkg/yarn/blob/298e0ea6cea3ab8a610cabf28de3fdf8e7fa8d1f/src/cli/commands/audit.js#L158-L162 | |
// | |
// Credit: https://github.com/yarnpkg/yarn/issues/7260#issuecomment-506556626 | |
stage('Node dependencies') { | |
steps { | |
sh script: '/bin/bash -c "yarn audit; [[ $? -ge 8 ]] && exit 1 || exit 0"', label: "Vulnerability audit" | |
sh script: 'yarn', label: 'Install dependencies' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.currency = function (format) { | |
var amt = this, neg; | |
// If no formatting string supplied | |
// or amount is not a number, return as is | |
if (!format || isNaN(amt)) return amt; | |
// Extract placeholders from format string | |
var formFig = format.match(/\#(.*)\#/g).pop(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
* Drag and drop your screenshots into the Github PR description, | |
* then copy and paste the URLs from the generated markdown into the `src`, | |
* and delete the generated markdown. | |
--> | |
<table> | |
<tr> | |
<th><strong>Before</strong></th> | |
<th><strong>After</strong></th> |
OlderNewer