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

bit-diff

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bit-diff

CanJS diff component

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bit-diff

ES6 use

With StealJS, you can import this module directly in a template that is autorendered:

<script type='text/stache' can-autorender>
	<can-import from="bit-diff"/>
	<bit-diff old-text="old text" new-text="new text"></bit-diff>
</script>

<script src='./node_modules/steal/steal.js'
	main="can/view/autorender/"></script>

Parameters

  • old-text (required): The original text being replaced1.
  • new-text (required): The new text that is replacing the original1.
  • mode: Numeric value, which mode to start the diff in. Options: 0 for side-by-side, 1 for inline. Default to inline.
  • width: Width of the diff box. Defaults to 600px. Width can be numeric (600 - assumes px), pixel (600px), or percentage (100%)

1If using an ES6 compiler, multi-line values can be used when enclosed in back-ticks (\``). Otherwise new-lines (\n`) should be added.

Keywords

FAQs

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