Function
Static Public Summary | ||
public |
This method returns a number indicating whether array1 comes before or after or is the same as the array2 in sort order (ascending order) 1 array1 comes after array2 -1 array1 comes before array2 0 array1 same as array2 |
|
public |
This method returns a number indicating whether obj1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 obj1 comes after obj2 -1 obj1 comes before obj2 0 obj1 same as obj2 |
|
public |
This method returns a number indicating whether date1 comes before or after or is the same as the date2 in sort order (ascending order) 1 date1 comes after date2 -1 date1 comes before date2 0 date1 same as date2 |
|
public |
This method returns compares to find both are same if not returns the new value |
|
public |
This method is to check the type if obj is null or undefined will always return false if Type is Object will always return true as Object is the super set |
|
public |
This method returns a number indicating whether num1 comes before or after or is the same as the num2 in sort order (ascending order) 1 num1 comes after num2 -1 num1 comes before num2 0 num1 same as mum2 |
|
public |
This method returns a number indicating whether obj1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 obj1 comes after obj2 -1 obj1 comes before obj2 0 obj1 same as obj2 |
|
public |
This method returns a number indicating whether str1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 str1 comes after str2 -1 str1 comes before str2 0 str1 same as str2 Its a wrapper to localeCompare function (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) |
Static Public
public array(array1: Array, array2: Array): Number source
import array from '@statetree/diff/lib/compare/array.js'
This method returns a number indicating whether array1 comes before or after or is the same as the array2 in sort order (ascending order) 1 array1 comes after array2 -1 array1 comes before array2 0 array1 same as array2
public compare(obj1: Object, obj2: Object): Number source
import compare from '@statetree/diff/lib/compare/index.js'
This method returns a number indicating whether obj1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 obj1 comes after obj2 -1 obj1 comes before obj2 0 obj1 same as obj2
public date(date1: Date, date2: Date): Number source
import date from '@statetree/diff/lib/compare/date.js'
This method returns a number indicating whether date1 comes before or after or is the same as the date2 in sort order (ascending order) 1 date1 comes after date2 -1 date1 comes before date2 0 date1 same as date2
public diff(oldValue: Object, newValue: Object): Object source
import diff from '@statetree/diff'
This method returns compares to find both are same if not returns the new value
public is(obj: Object, Type: Object): Boolean source
import is from '@statetree/diff/lib/is.js'
This method is to check the type if obj is null or undefined will always return false if Type is Object will always return true as Object is the super set
public number(num1: Number, num2: Number): Number source
import number from '@statetree/diff/lib/compare/number.js'
This method returns a number indicating whether num1 comes before or after or is the same as the num2 in sort order (ascending order) 1 num1 comes after num2 -1 num1 comes before num2 0 num1 same as mum2
public object(obj1: Object, obj2: Object): Number source
import object from '@statetree/diff/lib/compare/object.js'
This method returns a number indicating whether obj1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 obj1 comes after obj2 -1 obj1 comes before obj2 0 obj1 same as obj2
public string(str1: Object, str2: Object, isCaseSensitive: Boolean): Number source
import string from '@statetree/diff/lib/compare/string.js'
This method returns a number indicating whether str1 comes before or after or is the same as the obj2 in sort order (ascending order) 1 str1 comes after str2 -1 str1 comes before str2 0 str1 same as str2 Its a wrapper to localeCompare function (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare)