https://github.com/san650/ombu
JavaScript micro library to help modelling really simple page objects
https://github.com/san650/ombu
page-object
Last synced: 8 months ago
JSON representation
JavaScript micro library to help modelling really simple page objects
- Host: GitHub
- URL: https://github.com/san650/ombu
- Owner: san650
- License: mit
- Created: 2016-04-28T01:52:13.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-20T13:45:55.000Z (about 8 years ago)
- Last Synced: 2025-09-29T14:56:34.192Z (9 months ago)
- Topics: page-object
- Language: JavaScript
- Size: 10.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ombu

JavaScript micro library to help modelling really simple page objects.
## Synopsis
```js
var page = Ombu.create({
visit: '/path',
foo: {
scope: '.a-foo',
bar: '.a-bar'
}
});
console.log(page); // "/path"
console.log(page.foo); // ".a-foo"
console.log(page.foo.bar); // ".a-foo .a-bar"
```
## Usage
Ombu depends on [`Ceibo`](https://github.com/san650/ceibo) library. You need to load this library before Ombu.
```html
...
...
```
## API
### `Ombu.create(object)`
TBA
### `normalize(text)`
Trim whitespaces at both ends and normalize whitespaces inside `text`.
Due to variations in the HTML parsers in different browsers, the text returned may vary in newlines and other white space.
See [http://api.jquery.com/text/](http://api.jquery.com/text/).
```js
normalize('Hello \n\nWorld!\n') === 'Hello World!'
```
## Project's health
[](https://travis-ci.org/san650/ombu)
## License
Ombu is licensed under the MIT license.
See [LICENSE](./LICENSE) for the full license text.