2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
29 isRunningInLocalDevEnv() {
31 myHostName = location.host;
32 let myDebugServer = "www.mytesturl.com"
34 if ((myHostName.includes(myDebugServer) || myHostName.includes("localhost"))) {
43 var checkJSON = JSON.parse(JSON.stringify(json));
44 if (checkJSON && typeof checkJSON === 'object' && checkJSON !== null) {
45 // this.$log.debug('UtilsService::isValidJSON: JSON is valid! REMOVE THIS BEFORE COMMIT');
49 this.$log.error('UtilsService::isValidJSON: json passed is not valid: '+ err);
55 UtilsService.$inject = ['$log'];
56 angular.module('ecompApp').service('utilsService', UtilsService)