Skip to content

Commit c04571d

Browse files
fix(saslprep): saslprep typing in node.d.ts NODE-5996 (#254)
fix saslprep typing
1 parent e318c36 commit c04571d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/saslprep/src/node.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import data from './code-points-data';
44

55
const codePoints = createMemoryCodePoints(data);
66

7-
const saslprep = _saslprep.bind(null, codePoints);
7+
function saslprep(input: string, opts?: { allowUnassigned?: boolean }): string {
8+
return _saslprep(codePoints, input, opts);
9+
}
810

9-
Object.assign(saslprep, { saslprep, default: saslprep });
11+
saslprep.saslprep = saslprep;
12+
saslprep.default = saslprep;
1013

1114
export = saslprep;

0 commit comments

Comments
 (0)