mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 18:04:29 +00:00
v5
This commit is contained in:
parent
d1407282e6
commit
08403cd828
6774 changed files with 1602535 additions and 1 deletions
23
node_modules/normalize-package-data/lib/make_warning.js
generated
vendored
Normal file
23
node_modules/normalize-package-data/lib/make_warning.js
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
var util = require("util")
|
||||
var messages = require("./warning_messages.json")
|
||||
|
||||
module.exports = function() {
|
||||
var args = Array.prototype.slice.call(arguments, 0)
|
||||
var warningName = args.shift()
|
||||
if (warningName == "typo") {
|
||||
return makeTypoWarning.apply(null,args)
|
||||
}
|
||||
else {
|
||||
var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"
|
||||
args.unshift(msgTemplate)
|
||||
return util.format.apply(null, args)
|
||||
}
|
||||
}
|
||||
|
||||
function makeTypoWarning (providedName, probableName, field) {
|
||||
if (field) {
|
||||
providedName = field + "['" + providedName + "']"
|
||||
probableName = field + "['" + probableName + "']"
|
||||
}
|
||||
return util.format(messages.typo, providedName, probableName)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue