BOOMR.utils. Compression


The Compression plugin adds common compression code that other plugins can use.

For information on how to include this plugin, see the Building tutorial.

Beacon Parameters

This plugin adds no parameters to the beacon.

Methods


self.jsUrl(v)

Converts an object to URL-friendly JSON

Adapted from https://github.com/Sage/jsurl

Changes: Formatting Removal of Array.map and Object.map for compat with IE 6-8 Change of str[i] syntax to str.charAt(i) for compat with IE 6-7

Parameters:

Name Type Description
v object

Object to convert

Returns:

Type: string

URL-friendly JSON


self.jsUrlDecompress(s)

Converts from JSURL to JSON.

Adapted from https://github.com/Sage/jsurl

Parameters:

Name Type Description
s string

JSURL string

Returns:

Type: object

Decompressed object