Object.checksum >= 0.1.3

Purpose

Calculate the checksum for the given value

Syntax

Object.checksum ( variable );

Parameters

variable

Return values

String

Examples

Getting the checksum of a string

Object.checksum('string');>>> "S6-566fhr13x0b5i"

Getting the checksum of an object

Property order does not matter for regular objects, the checksum is always the same

var obj = {
    string : 'string',
    number : 1,
    null   : null
};

Object.checksum(obj);>>> "O3-S32-1rwxj53llycjl"

Get the checksum of an array

Property order DOES matter in arrays

var arr = [
    'string',
    1,
    true,
    {a: 1}
];

Object.checksum(arr);>>> "A4-S41-19pl31n1ob6q68"