Skip to content

Commit

Permalink
Update README to indicate that getAttrs() is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Sep 3, 2020
1 parent 9902ea9 commit 204065d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Represents an Event with a title, date, and flags
* [.url()](#Event+url) ⇒ <code>string</code>
* [.observedInIsrael()](#Event+observedInIsrael) ⇒ <code>boolean</code>
* [.observedInDiaspora()](#Event+observedInDiaspora) ⇒ <code>boolean</code>
* [.getAttrs()](#Event+getAttrs) ⇒ <code>Object</code>
* ~~[.getAttrs()](#Event+getAttrs) ⇒ <code>Object</code>~~

<a name="new_Event_new"></a>

Expand Down Expand Up @@ -262,8 +262,8 @@ ev2.observedInDiaspora(); // true
```
<a name="Event+getAttrs"></a>

### event.getAttrs() ⇒ <code>Object</code>
Optional additional event attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
### ~~event.getAttrs() ⇒ <code>Object</code>~~
***Deprecated***

**Kind**: instance method of [<code>Event</code>](#Event)
<a name="HDate"></a>
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@
},
"devDependencies": {
"@ava/babel": "^1.0.1",
"@babel/core": "^7.11.1",
"@babel/preset-env": "^7.10.3",
"@babel/register": "^7.10.5",
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@babel/register": "^7.11.5",
"@hebcal/solar-calc": "^1.0.4",
"@rollup/plugin-babel": "^5.2.0",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"ava": "^3.11.1",
"ava": "^3.12.1",
"core-js": "^3.6.5",
"eslint": "^7.7.0",
"eslint": "^7.8.1",
"eslint-config-google": "^0.14.0",
"gematriya": "^2.0.0",
"jsdoc": "^3.6.5",
"jsdoc-to-markdown": "^6.0.1",
"nyc": "^15.1.0",
"rollup": "^2.26.0",
"rollup-plugin-terser": "^7.0.0",
"rollup": "^2.26.9",
"rollup-plugin-terser": "^7.0.1",
"tsd-jsdoc": "^2.5.0",
"ttag-cli": "^1.8.4"
}
Expand Down
6 changes: 3 additions & 3 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export class Event {
* @param {Object} [attrs={}] optional additional attributes (e.g. `eventTimeStr`, `cholHaMoedDay`)
*/
constructor(date, desc, mask, attrs) {
if (typeof attrs === 'object') {
Object.keys(attrs).forEach((k) => this[k] = attrs[k]);
}
this.date = date;
this.desc = desc;
this.mask = +mask;
if (typeof attrs === 'object') {
Object.keys(attrs).forEach((k) => this[k] = attrs[k]);
}
}
/**
* Hebrew date of this event
Expand Down

0 comments on commit 204065d

Please sign in to comment.