版博士V2.0程序
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

needs_lookup.js 368 B

123456789101112131415161718
  1. 'use strict';
  2. var isPlainObject = require('is-plain-object').isPlainObject;
  3. function needsLookup(xtends) {
  4. if (typeof xtends === 'string' && xtends[0] === '.') {
  5. return true;
  6. }
  7. if (isPlainObject(xtends)) {
  8. // Objects always need lookup because they can't be used with `require()`
  9. return true;
  10. }
  11. return false;
  12. }
  13. module.exports = needsLookup;