Skip to content

Commit

Permalink
Remove the escape method on Model
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Jul 25, 2023
1 parent 2c896c0 commit 6c9f7aa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,11 @@ UI, while we're progressively getting rid of the views.
as an instance of HTMLElement and can be used to register a custom element or
web-component.

![](https://raw.githubusercontent.com/conversejs/skeletor/master/images/skeletor.jpg)

### Backwards incompatible changes

* Collection.prototype.forEach no longer returns the items being iterated over.
If you need that, use `map` instead.
* The `chain` method on Models has been removed.
* The `chain`, `clone` and `escape` methods on Models have been removed.
* The `inject`, `foldl` and `foldr` methods on Collections has been removed. You can use `reduce` instead.
* Removed the `sample`, `take`, `tail` and `initial` method on Collections.
* Removed the `without`, `reject` and `select` methods on Collections, use `filter`.
Expand Down
9 changes: 0 additions & 9 deletions src/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getResolveablePromise, getSyncMethod, urlError, wrapError } from './hel
import clone from 'lodash-es/clone.js';
import defaults from 'lodash-es/defaults.js';
import defer from 'lodash-es/defer.js';
import escape from 'lodash-es/escape.js';
import has from 'lodash-es/has.js';
import invert from 'lodash-es/invert.js';
import isEmpty from 'lodash-es/isEmpty.js';
Expand Down Expand Up @@ -150,14 +149,6 @@ class Model extends EventEmitter {
return isEmpty(this.attributes);
}

/**
* Get the HTML-escaped value of an attribute.
* @param {string} attr
*/
escape(attr) {
return escape(this.get(attr));
}

/**
* Returns `true` if the attribute contains a value that is not null
* or undefined.
Expand Down

0 comments on commit 6c9f7aa

Please sign in to comment.