简单的键值存储库 node-mkv

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-13 23:28:51

软件介绍

简单的键值存储库

下载安装

~ npm install --save[-dev] mkv
# or 
~ yarn add [--dev] mkv

API

mkv.set(key:string, value:any, readonly:boolean = false)

import mkv from "mkv"
 
mkv.set("hello", "hello world") // string
// -> hello world
mkv.set("options", { a: 1, b: 2, c: 3}) // object
// -> { a: 1, b: 2, c: 3})
 
// set readonly data.
mkv.set("readonly", 1, true);
// -> 1
mkv.set("readonly", 2)
// throw TypeError

mkv.get(key:string)

// in other files.
import mkv from "mkv"
 
mkv.get("hello")
// -> hello world
mkv.get("options")
// -> {a: 1, b: 2, c: 3}

mkv.has(key:string)

// in other files.
import mkv from "mkv"
 
mkv.has("hello")
// -> true
mkv.get("hello2")
// -> false

mkv.delete(key:string)

// in other files.
import mkv from "mkv"
 
mkv.delete("hello")
// -> true
mkv.get("hello")
// -> undefined

本文地址:https://codercto.com/soft/d/3530.html

Essential PHP Security

Essential PHP Security

Chris Shiflett / O'Reilly Media / 2005-10-13 / USD 29.95

Being highly flexible in building dynamic, database-driven web applications makes the PHP programming language one of the most popular web development tools in use today. It also works beautifully wit......一起来看看 《Essential PHP Security》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具