0.0.3 • Published 5 years ago
ordorgx v0.0.3
OrdoRGX
Currently just for basic read and write.
Installation
Using npm:
$ npm i --save ordorgx
Reading
const Regex = require('ordorgx');
const regex = new Regex();
regex.read('{Some}{regex}', function(data, next) {
if (data) {
console.log(data);
return next();
} else {
console.log('EOL');
}
});
Output:
Some
regex
EOL
Writing
const Regex = require('ordorgx');
const regex = new Regex();
const writed = regex.write('somestr');
console.log(writed);
Output:
[somestr]
Checking
const Regex = require('ordorgx');
const regex = new Regex();
const res1 = regex.checkInput('{Some}{Ok}');
const res2 = regex.checkInput('{Some}Ok');
const res3 = regex.checkInput('Someok');
Output:
true
false
false
Changelog
- 0.0.1 Release