mirror of
				https://github.com/flynx/diff.js.git
				synced 2025-10-29 19:10:11 +00:00 
			
		
		
		
	intro structore almost done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									ebda0193ff
								
							
						
					
					
						commit
						b3a524d1a9
					
				
							
								
								
									
										12
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								README.md
									
									
									
									
									
								
							| @ -6,6 +6,8 @@ | |||||||
| 	- [Introduction](#introduction) | 	- [Introduction](#introduction) | ||||||
| 		- [Seeing the difference (*diff*)](#seeing-the-difference-diff) | 		- [Seeing the difference (*diff*)](#seeing-the-difference-diff) | ||||||
| 		- [Applying changes (*patch*)](#applying-changes-patch) | 		- [Applying changes (*patch*)](#applying-changes-patch) | ||||||
|  | 		- [Partial patching](#partial-patching) | ||||||
|  | 		- [Checking](#checking) | ||||||
| 		- [Patterns](#patterns) | 		- [Patterns](#patterns) | ||||||
| 	- [Motivation](#motivation) | 	- [Motivation](#motivation) | ||||||
| 		- [Goals / Features](#goals--features) | 		- [Goals / Features](#goals--features) | ||||||
| @ -32,8 +34,6 @@ | |||||||
| 
 | 
 | ||||||
| Let's start with a couple of objects, similar but not quite: | Let's start with a couple of objects, similar but not quite: | ||||||
| ```javascript | ```javascript | ||||||
| var Diff = require('object-diff').Diff |  | ||||||
| 
 |  | ||||||
| var Bill = { | var Bill = { | ||||||
| 	name: 'Bill', | 	name: 'Bill', | ||||||
| 	age: 20, | 	age: 20, | ||||||
| @ -59,6 +59,8 @@ var Ted = { | |||||||
| ### Seeing the difference (*diff*) | ### Seeing the difference (*diff*) | ||||||
| 
 | 
 | ||||||
| ```javascript | ```javascript | ||||||
|  | var Diff = require('object-diff').Diff | ||||||
|  | 
 | ||||||
| var diff = Diff(Bill, Ted) | var diff = Diff(Bill, Ted) | ||||||
| 
 | 
 | ||||||
| // and log out the relevant part... | // and log out the relevant part... | ||||||
| @ -132,11 +134,15 @@ Since we applied all the changes to `Bill2`, now he looks just like `Ted`: | |||||||
| } | } | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | ### Partial patching | ||||||
| 
 | 
 | ||||||
| XXX partial patch...   | XXX partial patch...   | ||||||
| XXX check...   |  | ||||||
| XXX modify the diff -- teach Ted guitar...   | XXX modify the diff -- teach Ted guitar...   | ||||||
| 
 | 
 | ||||||
|  | ### Checking | ||||||
|  | 
 | ||||||
|  | XXX | ||||||
|  | 
 | ||||||
| ### Patterns | ### Patterns | ||||||
| 
 | 
 | ||||||
| And for further checking we can create a *pattern*: | And for further checking we can create a *pattern*: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user