import { fromNullable } from 'fp-ts/es6/Option';
var _clear = function () { return localStorage.clear(); };
/**
 * @since 0.2.0
 */
export var clear = _clear;
/**
 * @since 0.2.0
 */
export function getItem(key) {
    return function () { return fromNullable(localStorage.getItem(key)); };
}
/**
 * @since 0.2.0
 */
export function key(index) {
    return function () { return fromNullable(localStorage.key(index)); };
}
var _length = function () { return localStorage.length; };
/**
 * @since 0.2.0
 */
export var length = _length;
/**
 * @since 0.2.0
 */
export function removeItem(key) {
    return function () { return localStorage.removeItem(key); };
}
/**
 * @since 0.2.0
 */
export function setItem(key, value) {
    return function () { return localStorage.setItem(key, value); };
}
