Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
13
node_modules/gray-matter/lib/parse.js
generated
vendored
Normal file
13
node_modules/gray-matter/lib/parse.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
const getEngine = require('./engine');
|
||||
const defaults = require('./defaults');
|
||||
|
||||
module.exports = function(language, str, options) {
|
||||
const opts = defaults(options);
|
||||
const engine = getEngine(language, opts);
|
||||
if (typeof engine.parse !== 'function') {
|
||||
throw new TypeError('expected "' + language + '.parse" to be a function');
|
||||
}
|
||||
return engine.parse(str, opts);
|
||||
};
|
Reference in New Issue
Block a user