(names)
| 5 | const parseAllowScriptsList = require('@npmcli/config/lib/parse-allow-scripts-list.js') |
| 6 | |
| 7 | const buildPolicyFromNames = (names) => { |
| 8 | /* istanbul ignore if: callers only pass non-empty arrays */ |
| 9 | if (!names.length) { |
| 10 | return null |
| 11 | } |
| 12 | const policy = {} |
| 13 | for (const name of names) { |
| 14 | policy[name] = true |
| 15 | } |
| 16 | return policy |
| 17 | } |
| 18 | |
| 19 | // Read the `allow-scripts` value from one or more named config sources and |
| 20 | // build a policy object. Returns `null` if none of the sources has a value. |
no outgoing calls
no test coverage detected
searching dependent graphs…