Skip to content

Commit

Permalink
Fix: cross-version placeholder support (#3463)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harris-Miller committed May 7, 2024
1 parent c2a4b95 commit 3225400
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions source/__.js
@@ -1,4 +1,3 @@
import _placeholder from './internal/_placeholder.js';
/**
* A special placeholder value used to specify "gaps" within curried functions,
* allowing partial application of any combination of arguments, regardless of
Expand Down Expand Up @@ -26,4 +25,5 @@ import _placeholder from './internal/_placeholder.js';
* const greet = R.replace('{name}', R.__, 'Hello, {name}!');
* greet('Alice'); //=> 'Hello, Alice!'
*/
export default _placeholder;
export default {'@@functional/placeholder': true};

6 changes: 3 additions & 3 deletions source/internal/_isPlaceholder.js
@@ -1,5 +1,5 @@
import _placeholder from './_placeholder.js';

export default function _isPlaceholder(a) {
return a === _placeholder;
return a != null &&
typeof a === 'object' &&
a['@@functional/placeholder'] === true;
}
1 change: 0 additions & 1 deletion source/internal/_placeholder.js

This file was deleted.

0 comments on commit 3225400

Please sign in to comment.