UNPKG

@yugu/gogocode

Version:

The simplest tool to parse/transform/generate code on ast

15 lines (12 loc) 325 B
function isObject(value) { return typeof value == 'object' && value; } const hasOwn = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty); function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } module.exports = { isObject, hasOwn, escapeRegExp }