You've already forked serverless-offline
mirror of
https://github.com/encounter/serverless-offline.git
synced 2026-03-30 11:37:53 -07:00
17 lines
393 B
JavaScript
17 lines
393 B
JavaScript
'use strict';
|
|
|
|
const jsonPathPlus = require('jsonpath-plus');
|
|
const debugLog = require('./debugLog');
|
|
|
|
/*
|
|
Just a wrapper around an external dependency for debugging purposes
|
|
*/
|
|
module.exports = function jsonPath(json, path) {
|
|
|
|
debugLog('Calling jsonPath:', path);
|
|
const result = jsonPathPlus({ json, path, wrap: true })[0];
|
|
debugLog('jsonPath resolved:', result);
|
|
|
|
return result;
|
|
};
|