-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce disable persist option ("none") (#137)
* fix: persist option none is not working * refactor: save some bytes - remove unnecessary enum export - use const object instead of enum - avoid using optional chain operator * chore(deps): bump microbundle - saves another 200B gzipped * docs: add persist option to API documentation * Update README.md * Update constants.ts Co-authored-by: Bill <bluebill1049@hotmail.com>
- Loading branch information
1 parent
5e0ef1a
commit bf189d5
Showing
8 changed files
with
129 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export const STORE_DEFAULT_NAME = '__LSM__'; | ||
export const STORE_ACTION_NAME = '__LSM_NAME__'; | ||
export const PERSIST_BEFORE_UNLOAD = 'beforeUnload'; | ||
export const PERSIST_OPTION = { | ||
NONE: 'none', | ||
ACTION: 'action', | ||
UNLOAD: 'beforeUnload', | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.