You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

storage-io

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storage-io

Sample storage

1.0.0
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

storage-io

Sample storage memory ###Russian

Использование

Инициализация нового хранилища
'use strict';

var storage = new (require('storage-io'));

/* OR */

var Storage = require('storage-io');
var storage = new storage({
	one: 'value',
	two: 'value'
});
Установка ключа
storage.set(key,value); // this

Получение ключа

storage.get(key,defaultValue); // mixed|null
Проверка наличия ключа
storage.has(key); // boolean
Удаление ключа
storage.remove(key); // boolean
Получение ключей
storage.keys(); // array
Размер хранилища
storage.size(); // integer
Чистка хранилища
storage.clear(); // this
Получить всё хранилище
storage.all(key); // object
Клонировать хранилище
storage.clone(key); // this
ForEach
storage.each((elem,i,key) => {...});

###English

Using

Initialize the new storage
'use strict';

var storage = new (require('storage-io'));

/* OR */

var Storage = require('storage-io');
var storage = new storage({
	one: 'value',
	two: 'value'
});
Setting key
storage.set(key,value); // this

Getting key

storage.get(key,defaultValue); // mixed|null
Checking key
storage.has(key); // boolean
Removing the key
storage.remove(key); // boolean
Keys
storage.keys(); // array
Storage size
storage.size(); // integer
Cleaning storage
storage.clear(); // this
Get all the store
storage.all(key); // object
Clone repository
storage.clone(key); // this
ForEach
storage.each((elem,i,key) => {...});

Keywords

storage

FAQs

Package last updated on 03 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts