New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cdp-diff

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

cdp-diff

object diffing tool used by the Cheese Diff Protocol (CDP)

latest
Source
npmnpm
Version
0.0.13
Version published
Maintainers
1
Created
Source

cdp-diff

Build Status

This is the tool used by Cheese to create diffs for the Cheese Diff Protocol (CDP). This module can be used independently in node.js as well as the browser.

Installation

node

$ npm install --save cdp-diff

browser

Use bower:

$ bower install --save cdp-diff

Or download ./lib/cdp-diff.js and put it in a script tag.

API

diff.createDiff(old, new)

Create a diff between two objects, old and new. Applying this diff to old will turn old into new. This function returns the diff that was created.

diff.applyDiff(diff, obj)

Apply a diff (diff) to an object (obj). diff must be created by diff.createDiff, or must follow the same format. This function does not copy the object (obj) before applying the diff, so whatever object this function is called with will be modified. This function returns the modified object.

diff.copyObject(obj)

Copy an object (obj). This function returns a copy of the object.

License

MIT License. See ./LICENSE for details.

Keywords

utility

FAQs

Package last updated on 07 Nov 2014

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