Files
coopgo/node_modules/remark-stringify/lib/macro/one.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

21 lines
398 B
JavaScript

'use strict'
module.exports = one
function one(node, parent) {
var self = this
var visitors = self.visitors
// Fail on unknown nodes.
if (typeof visitors[node.type] !== 'function') {
self.file.fail(
new Error(
'Missing compiler for node of type `' + node.type + '`: `' + node + '`'
),
node
)
}
return visitors[node.type].call(self, node, parent)
}