Skip to content

Commit

Permalink
fix: Remove export indirection
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehall314 committed Apr 9, 2021
1 parent dd42aeb commit 25bdf97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/promisify.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ function promisify(original) {


promisify.argumentNames = customArgumentsToken;
promisify.Promise = undefined; // Export the public API
promisify.Promise = undefined;
7 changes: 2 additions & 5 deletions dist/promisify.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var customArgumentsToken = "__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";
* @return {function} A promisified version of `original`
*/

function promisify(original) {
export function promisify(original) {
// Ensure the argument is a function
if (typeof original !== "function") {
throw new TypeError("Argument to promisify must be a function");
Expand Down Expand Up @@ -63,8 +63,5 @@ function promisify(original) {
};
} // Attach this symbol to the exported function, so users can use it


promisify.argumentNames = customArgumentsToken;
promisify.Promise = undefined; // Export the public API

export { promisify };
promisify.Promise = undefined;
5 changes: 1 addition & 4 deletions lib/promisify.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const customArgumentsToken = "__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";
* @param {function} original - The function to promisify
* @return {function} A promisified version of `original`
*/
function promisify(original) {
export function promisify(original) {
// Ensure the argument is a function
if (typeof original !== "function") {
throw new TypeError("Argument to promisify must be a function");
Expand Down Expand Up @@ -61,6 +61,3 @@ function promisify(original) {
// Attach this symbol to the exported function, so users can use it
promisify.argumentNames = customArgumentsToken;
promisify.Promise = undefined;

// Export the public API
export {promisify};

0 comments on commit 25bdf97

Please sign in to comment.