Socket
Socket
Sign inDemoInstall

@textile/datastore-ttl

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@textile/datastore-ttl - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.github/workflows/deploy.yml

2

dist/index.d.ts

@@ -63,3 +63,3 @@ /// <reference types="node" />

* @param keys The keys
* @param ttl The time-to-live, in milliseconds. Skips update if not specified.
* @param ttl The time-to-live, in milliseconds. Skips update if not specified or infinitely large.
*/

@@ -66,0 +66,0 @@ protected addTTL(keys: Key[], ttl?: number): Promise<void>;

@@ -131,7 +131,7 @@ "use strict";

* @param keys The keys
* @param ttl The time-to-live, in milliseconds. Skips update if not specified.
* @param ttl The time-to-live, in milliseconds. Skips update if not specified or infinitely large.
*/
addTTL(keys, ttl) {
return __awaiter(this, void 0, void 0, function* () {
if (ttl === undefined)
if (ttl === undefined || ttl == Infinity)
return;

@@ -138,0 +138,0 @@ // @todo: Can we share a single 'batch' between addTTL and removeTTL?

{
"name": "@textile/datastore-ttl",
"version": "0.0.3",
"version": "0.0.4",
"description": "An implementation of the Datastore interface that supports a time-to-live for key-value pairs.",

@@ -42,3 +42,3 @@ "main": "dist/index",

"@types/mocha": "^5.2.7",
"@types/node": "^12.12.17",
"@types/node": "^13.1.2",
"@typescript-eslint/eslint-plugin": "^2.9.0",

@@ -45,0 +45,0 @@ "@typescript-eslint/parser": "^2.9.0",

@@ -9,4 +9,4 @@ # Time to Live Datastore _(datastore-ttl)_

[![Release](https://img.shields.io/github/release/textileio/js-datastore-ttl.svg?style=flat-square)](https://github.com/textileio/js-datastore-ttl/releases/latest)
[![docs](https://img.shields.io/badge/docs-master-success.svg?style=popout-square)](https://textileio.github.io/js-datastore-ttl)
[![CircleCI branch](https://img.shields.io/circleci/project/github/textileio/js-datastore-ttl/master.svg?style=flat-square)](https://circleci.com/gh/textileio/js-datastore-ttl)
[![Docs](https://img.shields.io/badge/docs-master-success.svg?style=popout-square)](https://textileio.github.io/js-datastore-ttl)
[![Workflow](https://img.shields.io/github/workflow/status/textileio/js-datastore-ttl/Lint%20&%20Test?style=flat-square)](https://github.com/textileio/js-datastore-ttl/actions)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

@@ -59,2 +59,5 @@

// Simple promise-based sleep function
const sleep = (ms: number) => new Promise(r => setTimeout(r, ms))
// Use any compliant Datastore

@@ -61,0 +64,0 @@ const child = new MemoryDatastore()

@@ -121,6 +121,6 @@ import { Buffer } from 'buffer'

* @param keys The keys
* @param ttl The time-to-live, in milliseconds. Skips update if not specified.
* @param ttl The time-to-live, in milliseconds. Skips update if not specified or infinitely large.
*/
protected async addTTL(keys: Key[], ttl?: number) {
if (ttl === undefined) return
if (ttl === undefined || ttl == Infinity) return
// @todo: Can we share a single 'batch' between addTTL and removeTTL?

@@ -127,0 +127,0 @@ await this.lock.writeLock()

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc