rx4d custom rules # 2

node v8.11.3
version: 1.0.0
endpointsharetweet
const { match, rules } = require('rx4d'); const custom = rules({}, Object.keys(match.object).reduce((acc, key) => { if (typeof match.object[key] !== 'function') { acc[key] = (self) => `${self}${match[key]()}`; } return acc; }, {})); const spaces = custom.whiteSpace().oneOrMoreTimes(); console.log(spaces());
Loading…

no comments

    sign in to comment