(content, options, context)
| 75 | return updatedContent.replace(/^\s+|\s+$/g, '') |
| 76 | }, |
| 77 | METHODZ(content, options, context) { |
| 78 | let updatedContent = '' |
| 79 | const opts = options || {} |
| 80 | const basePath = path.dirname(context.originalPath) |
| 81 | const browserPath = opts.browser || path.join(basePath, 'src/browser.js') |
| 82 | const nodePath = opts.node || path.join(basePath, 'src/node.js') |
| 83 | const packageJson = fs.readFileSync(path.join(basePath, 'package.json'), 'utf-8') |
| 84 | const pkg = JSON.parse(packageJson) |
| 85 | |
| 86 | // TODO parse AST and get available methods |
| 87 | const lib = require(path.resolve(pkg.main)) |
| 88 | |
| 89 | if (typeof lib === 'function') { |
| 90 | const string = lib.toString() |
| 91 | // console.log('string', string) |
| 92 | |
| 93 | // const methods = lib() |
| 94 | // console.log('methods', methods) |
| 95 | } |
| 96 | // console.log('lib', lib) |
| 97 | return updatedContent |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 |
nothing calls this directly
no outgoing calls
no test coverage detected