Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed Aug 5, 2024
1 parent 49098e2 commit ac8b5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import _isTypedArray from './internal/_isTypedArray.js';

/**
* Returns the empty value of its argument's type. Ramda defines the empty
* value of Array (`[]`), Object (`{}`), String (`''`),
* value of Array (`[]`), Object (`{}`), String (`''`), Map (`new Map()`), Set (`new Set()`),
* TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other
* types are supported if they define `<Type>.empty`,
* `<Type>.prototype.empty` or implement the
Expand All @@ -30,6 +30,7 @@ import _isTypedArray from './internal/_isTypedArray.js';
* R.empty('unicorns'); //=> ''
* R.empty({x: 1, y: 2}); //=> {}
* R.empty(Uint8Array.from('123')); //=> Uint8Array []
* R.empty(Set); //=> Set()
*/
var empty = _curry1(function empty(x) {
return (
Expand Down
2 changes: 2 additions & 0 deletions source/isEmpty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import equals from './equals.js';
* R.isEmpty({}); //=> true
* R.isEmpty({length: 0}); //=> false
* R.isEmpty(Uint8Array.from('')); //=> true
* R.isEmpty(new Set()) //=> true
* R.isEmpty(new Map()) //=> true
*/
var isEmpty = _curry1(function isEmpty(x) {
return x != null && equals(x, empty(x));
Expand Down

0 comments on commit ac8b5be

Please sign in to comment.