Skip to content

Commit

Permalink
some docs fixes
Browse files Browse the repository at this point in the history
Former-commit-id: bbd6220a5186e75b05c601f4928b117c384681f0 [formerly 62ca32ccfed48e89a3f6e40cc306fb6b5712744e]
Former-commit-id: 509a00842c574331a670d305d15ec8529fec0e29
  • Loading branch information
andrewplummer committed Jan 19, 2016
1 parent a649b97 commit 67494ae
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
3 changes: 0 additions & 3 deletions CAUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ v2.0.0+
- Level: Minor
- `Date#set` now rewinds dates that have accidentally traversed into a new month, such as setting `{ month: 1 }` on `January 31st`. This behavior was previously only on `advance` and `rewind`.

- Level: Minor
- `String#escapeHTML` now double escapes entities, meaning '&' will become '&', etc.

- Level: Minor
- `Date.SugarNewDate` is now `Sugar.Date.newDateInternal`. This method is always on the `Sugar` global (not `Date`).

Expand Down
17 changes: 11 additions & 6 deletions lib/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,28 +295,31 @@ function getSortEquivalents() {


/***
* @method Array.sortIgnore([reg])
* @method Array.sortIgnore([reg] = null)
* @returns Mixed
* @accessor
* @short Gets or sets a regex to ignore when sorting.
* @extra Used by `Array#sortBy`. (Default is `null`)
* @extra Used by `Array#sortBy`.
*
***
* @method Array.sortIgnoreCase([bool])
* @method Array.sortIgnoreCase([bool] = true)
* @returns Mixed
* @accessor
* @short Gets or sets a boolean that ignores case when sorting.
* @extra Used by `Array#sortBy`. (Default is `true`);
* @extra Used by `Array#sortBy`.
*
***
* @method Array.sortNatural([bool])
* @method Array.sortNatural([bool] = true)
* @returns Mixed
* @accessor
* @short Gets or sets a boolean that turns on natural sort mode.
* @extra Used by `Array#sortBy`. "Natural sort" means that numerals like "10"
* will be sorted naturally after "9" instead of after "1".
* (Default is `true`)
*
***
* @method Array.sortCollate([fn])
* @returns Mixed
* @accessor
* @short Gets or sets the collation function used when sorting strings.
* @extra Used by `Array#sortBy`. The default is a natural string sort based on
* other `sort` options. Setting the collation function directly here will
Expand All @@ -325,6 +328,7 @@ function getSortEquivalents() {
***
* @method Array.sortOrder([str])
* @returns Mixed
* @accessor
* @short Gets or sets a string of characters to use as the base sort order.
* @extra Used by `Array#sortBy`. The default is an order natural to most major
* world languages, but can be modified as needed. Setting to `null`
Expand All @@ -333,6 +337,7 @@ function getSortEquivalents() {
***
* @method Array.sortEquivalents([obj])
* @returns Mixed
* @accessor
* @short Gets or sets a table of characters that should be considered equivalent
* when sorting (for example "é" and "e").
* @extra Used by `Array#sortBy`. The default table produces a natural sort order
Expand Down
8 changes: 7 additions & 1 deletion lib/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -1989,8 +1989,14 @@ function buildRelativeAliases() {
/**
* @method Date.newDateInternal([fn])
* @returns Mixed
* @accessor
* @short Gets or sets Sugar's internal date constructor.
* @extra Many methods construct a `new Date()` internally as a reference point (`isToday`, relative formats like `tomorrow`, etc). You can override this here if you need it to be something else. Most commonly, this allows you to return a shifted date to simulate a specific timezone, as dates in Javascript are always local. Setting to `null` restores the default.
* @extra Many methods construct a `new Date()` internally as a reference point
* (`isToday`, relative formats like `tomorrow`, etc). You can override
* this here if you need it to be something else. Most commonly, this
* allows you to return a shifted date to simulate a specific timezone,
* as dates in Javascript are always local. Setting to `null` restores
* the default.
*
**/

Expand Down
2 changes: 2 additions & 0 deletions lib/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ defineStatic(sugarNumber, {
/***
* @method Number.thousands([str])
* @returns Mixed
* @accessor
* @short Gets or sets a string to be used as the thousands marker (default ",").
* @extra Used by `Number#format`, `Nubmer#abbr`, `Number#metric`, and `Number#bytes`. Setting to `null` restores the default.
*
***
* @method Number.decimal([str])
* @returns Mixed
* @accessor
* @short Gets or sets a string to be used as the decimal marker (default ".").
* @extra Used by `Number#format`, `Nubmer#abbr`, `Number#metric`, and `Number#bytes`. Setting to `null` restores the default.
*
Expand Down

0 comments on commit 67494ae

Please sign in to comment.