1/*! 2 * angular-translate - v2.10.0 - 2016-02-28 3 * 4 * Copyright (c) 2016 The angular-translate team, Pascal Precht; Licensed MIT 5 */ 6(function (root, factory) { 7 if (typeof define === 'function' && define.amd) { 8 // AMD. Register as an anonymous module unless amdModuleId is set 9 define([], function () { 10 return (factory()); 11 }); 12 } else if (typeof exports === 'object') { 13 // Node. Does not work with strict CommonJS, but 14 // only CommonJS-like environments that support module.exports, 15 // like Node. 16 module.exports = factory(); 17 } else { 18 factory(); 19 } 20}(this, function () { 21 22angular.module('pascalprecht.translate') 23 24/** 25 * @ngdoc object 26 * @name pascalprecht.translate.$translateCookieStorage 27 * @requires $cookieStore 28 * 29 * @description 30 * Abstraction layer for cookieStore. This service is used when telling angular-translate 31 * to use cookieStore as storage. 32 * 33 */ 34 .factory('$translateCookieStorage', $translateCookieStorageFactory); 35 36function $translateCookieStorageFactory($cookieStore) { 37 38 'use strict'; 39 40 var $translateCookieStorage = { 41 42 /** 43 * @ngdoc function 44 * @name pascalprecht.translate.$translateCookieStorage#get 45 * @methodOf pascalprecht.translate.$translateCookieStorage 46 * 47 * @description 48 * Returns an item from cookieStorage by given name. 49 * 50 * @param {string} name Item name 51 * @return {string} Value of item name 52 */ 53 get: function (name) { 54 return $cookieStore.get(name); 55 }, 56 57 /** 58 * @ngdoc function 59 * @name pascalprecht.translate.$translateCookieStorage#set 60 * @methodOf pascalprecht.translate.$translateCookieStorage 61 * 62 * @description 63 * Sets an item in cookieStorage by given name. 64 * 65 * @deprecated use #put 66 * 67 * @param {string} name Item name 68 * @param {string} value Item value 69 */ 70 set: function (name, value) { 71 $cookieStore.put(name, value); 72 }, 73 74 /** 75 * @ngdoc function 76 * @name pascalprecht.translate.$translateCookieStorage#put 77 * @methodOf pascalprecht.translate.$translateCookieStorage 78 * 79 * @description 80 * Sets an item in cookieStorage by given name. 81 * 82 * @param {string} name Item name 83 * @param {string} value Item value 84 */ 85 put: function (name, value) { 86 $cookieStore.put(name, value); 87 } 88 }; 89 90 return $translateCookieStorage; 91} 92$translateCookieStorageFactory.$inject = ['$cookieStore']; 93 94$translateCookieStorageFactory.displayName = '$translateCookieStorage'; 95return 'pascalprecht.translate'; 96 97}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.