Adobe Launch Logo Adobe Experience Platform Launch

    • Light
    • Dark

Core Modules

This is a list of core modules that you may use within your library modules. You may access these modules using require('@adobe/reactor-name-of-module'). We try to limit core modules to those we feel will be useful across extensions in order to not cause unnecessary bloat.


objectAssign(target: Object, ...sources: Object[]) => Object

var objectAssign = require('@adobe/reactor-object-assign');
var all = objectAssign({ a: 'a' }, { b: 'b' });

Mimics the native Object.assign by copying properties from source objects to a target object.

var cookie = require('@adobe/reactor-cookie');
cookie.set('foo', 'bar');

A utility for reading and writing cookies. See the js-cookie npm package for more information.


document: Object

var document = require('@adobe/reactor-document');

The document object. This can be beneficial when testing the module by allowing tests to inject a mock document object using utilities like inject-loader.


queryString: Object<string, Function>

var queryString = require('@adobe/reactor-query-string');
var parsed = queryString.parse(;
var obj = {
  campaign: 'Campaign A'
var stringified = queryString.stringify(obj);

A utility for parsing and serializing query strings. The utility has the following methods:

  • queryString.parse(string: String)

    Parses a query string into an object. Leading ?, #, and & characters on the query string are ignored.

  • queryString.stringify(object: Object)

    Stringifies an object into a query string.


loadScript(url: string) => Promise

var loadScript = require('@adobe/reactor-load-script');
var url = '';
loadScript(url).then(function() {
  // Do something ...

Loads a script when given a URL. A script tag will be created and placed within the head node of the document. A promise will be returned which you may use to determine when loading of the script succeeds or fails.


Promise: Constructor

var Promise = require('@adobe/reactor-promise');
new Promise(function(resolve) {
}, function(err) {

A constructor that mimics the Promise API native in ECMAScript 6. If the native Promise API is available, it will be returned instead.


window: Object

var window = require('@adobe/reactor-window');

The window object. This can be beneficial when testing the module by allowing tests to inject a mock window object using utilities like inject-loader.