🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

keysrun

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

keysrun

SDK for keys.run

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
10
42.86%
Maintainers
1
Weekly downloads
 
Created
Source

Keys.run

Keys.run is a blazing fast, dead simple key-value API.

Get started

Install the npm module using:

npm install keysrun --save

Save a get

const keys = require('keysrun')

keys.init('YOUR_API_KEY')

keys.set('highscore', 3000).then(_ => {
    console.log(`New high score is saved!`)
})

Get a get

const keys = require('keysrun')

keys.init('YOUR_API_KEY')

keys.get('highscore').then(highscore => {
    console.log(`The current highscore is ${highscore}`)
})

Scoping

Let's say your want to have different keys for your production environment and dev environment, but having the same.

All you have to do is keys.namespace('dev').

Example:

const keys = require('keysrun')

keys.init('YOUR_API_KEY')
keys.namespace('production')

// This will actually set the key 'production/highscore'
keys.get('highscore').then(highscore => {
    console.log(`The current highscore is ${highscore}`)
})

FAQs

Package last updated on 06 Apr 2018

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