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
const functions = require('firebase-functions'); | |
const express = require("express"); | |
const path = require('path'); | |
const bodyParser = require('body-parser'); | |
const admin = require("firebase-admin"); | |
var serviceAccount = require("./serviceAccountKey.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), |
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
const admin = require("firebase-admin"); | |
var serviceAccount = require("./serviceAccountKey.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount), | |
databaseURL: "https://vlearn-lanka.firebaseio.com", | |
storageBucket: "vlearn-lanka.appspot.com" | |
}); |
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
export module LKPhoneValidator | |
{ | |
export function Validate(phone : string) : PhoneValidation | |
{ | |
// remove starting +94 | |
phone = phone.replace("+94", "0"); | |
// Consider number length | |
if ((phone.startsWith('0') && phone.length == 10) || (!phone.startsWith('0') && phone.length == 9) && /^\d+$/.test(phone)) | |
{ |
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
0 info it worked if it ends with ok | |
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', | |
1 verbose cli 'C:\\Users\\SPT\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', | |
1 verbose cli 'install' ] | |
2 info using npm@6.4.1 | |
3 info using node@v8.10.0 | |
4 verbose npm-session 2003944f504d7f47 | |
5 silly install runPreinstallTopLevelLifecycles | |
6 silly preinstall traveller@1.0.0 | |
7 info lifecycle traveller@1.0.0~preinstall: traveller@1.0.0 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |