Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

temporal-hash

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

temporal-hash

Hash with key insertion time preserved

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Temporal Hash Build Status

update(hash, timestamp)

  • hash - the data to add to the temporal hash
  • timestamp - optional defaulting to Date.now()

resolve()

Deep merge all of the hashes in order by time ascending and return the result.

compact(timestamp)

  • timestamp - optional defaulting to Date.now()

Same as resolve() however also clears internal store and adds one value to the store at the provided timestamp.

lodash.merge, null and undefined

Using lodash merge which by default ignores when keys have a value of undefined -- so keys can't be cleared. For example,

var _ = require('lodash');

_.merge({a: 10, q: 20}, {a: 42, q: undefined})

Returns:

{ a: 42, q: 20 }

However, if q: null, we would end up with:

{ a: 42, q: null }

It would be preferable to have q get cleared if it were set to undefined so that behavior will eventually be implemented.

Keywords

FAQs

Package last updated on 25 Apr 2015

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

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