UNPKG

react-klasha

Version:

This is an reactJS library for implementing klasha payment gateway

12 lines (9 loc) 375 B
export const addBabelPlugin = (options, plugin) => ({ ...options, plugins: options.plugins.concat(plugin) }); let warned = {}; export function warnOnce(ctx, msg) { if (warned[msg]) return; warned[msg] = true; ctx.warn(msg); } const regExpCharactersRegExp = /[\\^$.*+?()[\]{}|]/g; export const escapeRegExpCharacters = str => str.replace(regExpCharactersRegExp, '\\$&');