简单的键值存储库 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

Algorithms

Algorithms

Robert Sedgewick、Kevin Wayne / Addison-Wesley Professional / 2011-3-19 / USD 89.99

Essential Information about Algorithms and Data Structures A Classic Reference The latest version of Sedgewick,s best-selling series, reflecting an indispensable body of knowledge developed over the ......一起来看看 《Algorithms》 这本书的介绍吧!

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

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具