UNPKG

npm-check-extras

Version:

CLI app to check for outdated and unused dependencies, and run update/delete action over selected ones

21 lines (20 loc) 694 B
import { computed } from 'nanostores'; import * as R from 'ramda'; import RU from '../ramda-utils.js'; import { $availableActions } from '../store.js'; const $submitButtonText = computed($availableActions, (availableActions) => { const found = R.find(RU.oAry(RU.isSelected), availableActions); if (found !== null) { const targetName = found?.value.name; if (R.equals(targetName, 'show-history')) { return 'Show history'; } if (targetName === 'revert-updates') { return 'Show date points to revert'; } } return 'Check dependencies'; }); export const optionsSelectors = { submitButtonText: $submitButtonText, };