-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jonaslaux
committed
May 3, 2018
1 parent
48787af
commit 94bbdfc
Showing
5 changed files
with
31 additions
and
20 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,13 @@ | ||
import {NativeModules} from 'react-native'; | ||
|
||
export default NativeModules.AnylineSDKPlugin; | ||
const Buffer = require('buffer/').Buffer; | ||
|
||
export default NativeModules.AnylineSDKPlugin; | ||
|
||
|
||
export const getLicenseExpiryDate = (License) => { | ||
const licenseString = Buffer.from(License, 'base64').toString('ascii'); | ||
const licenseJsonString = licenseString.substr(0, licenseString.lastIndexOf('}')+1); | ||
const licenseJson = JSON.parse(licenseJsonString); | ||
return licenseJson.valid; | ||
}; |
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 |
---|---|---|
|
@@ -18,5 +18,8 @@ | |
], | ||
"directories": { | ||
"example": "examples" | ||
}, | ||
"dependencies": { | ||
"buffer": "^5.1.0" | ||
} | ||
} |