Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlesfries/ember-wildcard
An Ember service that verifies equality between strings that contain arbitrary data.
https://github.com/charlesfries/ember-wildcard
ember ember-addon ember-testing
Last synced: 29 days ago
JSON representation
An Ember service that verifies equality between strings that contain arbitrary data.
- Host: GitHub
- URL: https://github.com/charlesfries/ember-wildcard
- Owner: charlesfries
- License: mit
- Created: 2018-07-30T05:07:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-02T00:56:57.000Z (over 6 years ago)
- Last Synced: 2024-11-08T05:41:38.520Z (3 months ago)
- Topics: ember, ember-addon, ember-testing
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-wildcard
==============================================================================```js
let isMatch = this.get('compare').wildcard('ID #9237720978', 'ID #**********'); // true
``````js
// app/routes/index.jsexport default Ember.Object.extend({
wildcard: Ember.inject.service(),afterModel: function(model) {
this.get('wildcard').setSymbol('*');
let url = model.url;
let expected = 'https://www.google.com/search?client=safari&rls=en&q=**********&ie=UTF-8&oe=UTF-8';if (this.get('wildcard').match(url, expected)) {
// strings are equal
}
}
});
```Installation
------------------------------------------------------------------------------```
ember install ember-wildcard
```Usage
------------------------------------------------------------------------------ember-wildcard is an addon for comparing strings that contains arbitrary data, such at IDs or timestamps. This addon is especially useful when writing tests and comparing expected and actual output.
Contributing
------------------------------------------------------------------------------### Installation
* `git clone https://github.com/charlesfries/ember-wildcard`
* `cd ember-wildcard`
* `npm install`### Linting
* `npm run lint:js`
* `npm run lint:js -- --fix`### Running tests
* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `npm test` – Runs `ember try:each` to test your addon against multiple Ember versions### Running the dummy application
* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).For more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).
License
------------------------------------------------------------------------------This project is licensed under the [MIT License](LICENSE.md).