Skip to content

Commit

Permalink
Pass along the passkey in the FlatNotepad translator
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGeek committed Feb 9, 2019
1 parent e71432c commit b95baa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upad-parse",
"version": "6.0.1",
"version": "6.0.2",
"description": "This is a parser for the NPX file format that µPad uses",
"main": "dist/index.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/Translators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ export namespace Translators {

/**
* @param {string | object} json A {@link Notepad} object in JSON format or as a plain object
* @param {string | undefined} passkey The passkey to decrypt the notepad if it's encrypted.
* @returns {FlatNotepad}
*/
export async function toFlatNotepadFromNotepad(json: string | object): Promise<FlatNotepad> {
return (await toNotepadFromNotepad(json)).flatten();
export async function toFlatNotepadFromNotepad(json: string | object, passkey?: string): Promise<FlatNotepad> {
return (await toNotepadFromNotepad(json, passkey)).flatten();
}

/**
Expand Down

0 comments on commit b95baa6

Please sign in to comment.