Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Digiman
Digiman / StorageHelper.ts
Last active December 27, 2023 13:34
Simple helper module on TypeScript for using local storage (HTML5) in browser. Also have the class to store the list of emails that need to use for autocomplete in the some pages.
// module with classes and logic for working with local storage in browsers via JavaScript
// see also: http://professorweb.ru/my/html/html5/level5/5_1.php
module StorageHelper {
export interface IStorageItem {
key: string;
value: any;
}
export class StorageItem {
key: string;
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
//
// This is a hack to fill the gap between 480 and 760 pixels - a missing range
// in the bootstrap responsive grid structure. Use these classes to style pages
// on cellphones when they transition from portrait to landscape.
//
// NOTE: Here I use SASS instead of LESS for styling. To convert to LESS
// replace '$screen' with '@screen' and '$grid' with '@grid'.
//
// See https://github.com/twbs/bootstrap/issues/10203 for more info.