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

cape-changes

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

cape-changes

Simple item list diff.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Simple item list diff.

Say you have a saved list of items and you fetch a fresh list of items. Use this library to compare and get lists of created, updated, deleted items.

API

createFeedInfo(items)

Returns { items: [{ id: 'abc', revision: 'f3295...'}], revision: 'aw3bc123' }

  • Adds revision property on every item.
  • Calculates revision of all items.

checkFeed(saved, fresh)

saved needs to have items in the form of an object keyed by id.

getTouchedIds(checkFeedResult)

Creates a single array that combines created, updated, deleted. That order may change in the future. Each value in the array looks like { id: ID, action: ACTION }.

checkFeedGetTouched(saved, fresh)

Same as checkFeed but includes touchedIds field.

FAQs

Package last updated on 15 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

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