UNPKG

@nodescript/stdlib

Version:
21 lines (20 loc) 450 B
export const module = { version: '1.0.4', moduleName: 'RegExp', description: 'Creates a regular expression.', params: { regexp: { schema: { type: 'string' }, }, flags: { schema: { type: 'string' }, }, }, result: { schema: { type: 'any' }, } }; export const compute = params => { const { regexp, flags } = params; return new RegExp(regexp, flags); };