UNPKG

babel-plugin-console

Version:

Babel plugin with additional console helper functions

16 lines (11 loc) 555 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const { negate } = require('../../utils'); const getIdentifiers = predicate => bindings => Object.keys(bindings).map(key => bindings[key]).filter(predicate).map(({ identifier }) => identifier); const isParam = binding => binding.kind === 'param'; const getParamIdentifiers = getIdentifiers(isParam); const getVariableIdentifiers = getIdentifiers(negate(isParam)); exports.getParamIdentifiers = getParamIdentifiers; exports.getVariableIdentifiers = getVariableIdentifiers;