This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NanBooleanOptionValue -> BooleanOptionValue
- Loading branch information
1 parent
5d5a7e9
commit 39c614a
Showing
5 changed files
with
48 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ bench/ | |
*.obj | ||
*.1sdk.pdb | ||
*.lastbuildstate | ||
npm-debug.log |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Copyright (c) 2012-2015 LevelDOWN contributors | ||
* See list at <https://github.com/level/leveldown#contributing> | ||
* MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md> | ||
*/ | ||
|
||
#ifndef LD_COMMON_H | ||
#define LD_COMMON_H | ||
|
||
#include <nan.h> | ||
|
||
namespace leveldown { | ||
|
||
NAN_INLINE bool BooleanOptionValue(v8::Local<v8::Object> options, | ||
v8::Handle<v8::String> key, | ||
bool def = false) { | ||
if (def) { | ||
return options.IsEmpty() | ||
|| !options->Has(key) | ||
|| options->Get(key)->BooleanValue(); | ||
} else { | ||
return !options.IsEmpty() | ||
&& options->Has(key) | ||
&& options->Get(key)->BooleanValue(); | ||
} | ||
} | ||
|
||
} // namespace leveldown | ||
|
||
#endif |
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