Comparing version 1.0.1 to 1.2.0
{ | ||
"name": "rox-node", | ||
"version": "1.0.1", | ||
"version": "1.2.0", | ||
"description": "Rollout.io ROX JS SDK Node", | ||
@@ -42,6 +42,6 @@ "author": "Rollout.io <support@rollout.io>", | ||
}, | ||
"main": "dist/rox.node.js", | ||
"main": "dist/rox-node.js", | ||
"module": "src/index.js", | ||
"dependencies": { | ||
"rox-base": "^1.0.0" | ||
"rox-base": "^1.2.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
 | ||
ROX is a Continuous Feature Rollouts system | ||
Rollout is a Continuous Feature Rollouts system | ||
@@ -9,11 +9,11 @@ > Accelerate development and minimize the risk of deploying new code with simple to create feature flags, controlled rollouts, and contextual analytics & integrations. | ||
* **Client-first:** ROX is the first feature flagging system built from the ground up to run directly inside phones, tablets, wearables and remote devices | ||
* **Simple:** ROX allows developer to focus on their business logic and not working with complex configuration on the dashabord | ||
* **Client-first:** Rollout is the first feature flagging system built from the ground up to run directly inside phones, tablets, wearables and remote devices | ||
* **Simple:** Rollout allows developer to focus on their business logic and not working with complex configuration on the dashabord | ||
* **Modern:** Using static types, the compiler and IDE are responsible to prevent collisions to allow easy flags discovery by develoeprs (by autocomplete) | ||
* **Support Optimizations:** ROX unique proposition is that is supports the company needs a full capable exerimentation system, for A/B/N testing, optimizations, customizations and more | ||
* **Remote Conifguraion included:** ROX include a remote configuraiton module that allows developers to defined configuration that can be controlled from the server | ||
* **Support Optimizations:** Rollout unique proposition is that is supports the company needs a full capable exerimentation system, for A/B/N testing, optimizations, customizations and more | ||
* **Remote Conifguraion included:** Rollout include a remote configuraiton module that allows developers to defined configuration that can be controlled from the server | ||
## Getting Started | ||
Please see the detailed instructions in our docs how to [add ROX to your project](https://support.rollout.io/docs/installing-the-sdk). | ||
Please see the detailed instructions in our docs how to [add Rollout to your project](https://support.rollout.io/docs/installing-the-sdk). | ||
@@ -24,5 +24,5 @@ ## Documentation | ||
# ROX JS SDK for NodeJS 🦆 | ||
# Rollout JS SDK for NodeJS 🦆 | ||
The package is Javascript SDK of [ROX](https://rollout.io) by Rollout.io for integration with NodeJS applications. Define and use simple and advanced feature flags, remote configuration variables, static and computed custom properties in code. Control your application via Rollout.io [dashboard](https://app.rollout.io). | ||
The package is Javascript SDK of [Rollout](https://rollout.io) for integration with NodeJS applications. Define and use simple and advanced feature flags, remote configuration variables, static and computed custom properties in code. Control your application via Rollout.io [dashboard](https://app.rollout.io). | ||
@@ -34,53 +34,2 @@ ## Installation | ||
## Usage | ||
Obtain application key by registering at [Rollout.io](https://app.rollout.io). As soon as your app is created, start using the SDK | ||
```javascript | ||
import Rox from 'rox-node'; | ||
const appSettingsContainer = { | ||
shouldShoWelcome: new Rox.Flag(), | ||
textColor: new Rox.Configuration('black') | ||
}; | ||
const onRoxReady = () => { | ||
if (appSettingsContainer.shouldShoWelcome.isEnabled) { | ||
const color = appSettingsContainer.textColor.value | ||
const div = document | ||
.createElement('div') | ||
.textContent('Hello world!') | ||
.setAttribute('style', `color: ${color}`); | ||
const body = document.getElementsByTagName('body')[0] | ||
body.appendChild(div) | ||
} | ||
}; | ||
Rox.register('settingsNamespace', appSettingsContainer); | ||
Rox.setup('<app key', { | ||
syncCompletionHandler: onRoxReady | ||
}); | ||
``` | ||
## Configure the SDK with different options | ||
Override the default configuration by prodiving predefined configuration preset for `Rox.setup`. | ||
For example: | ||
```javascript | ||
import Rox from 'rox-node'; | ||
/* | ||
- roxOptions.distinctId | ||
- roxOptions.version | ||
- roxOptions.syncComplitionHandler | ||
*/ | ||
const roxOptions = { | ||
distinctId: 'sessionDistinctId', | ||
version: '1.0', | ||
syncCompletionHandler: () => {} | ||
}; | ||
Rox.setup('appKey', roxOptions); | ||
``` | ||
## LICENSE | ||
@@ -92,4 +41,4 @@ | ||
_If you use ROX and are happy with it, all we ask is that you please consider emailing [support@rollout.io](mailto:support@rollout.io) to share your thoughts!_ | ||
_If you use Rollout and are happy with it, all we ask is that you please consider emailing [support@rollout.io](mailto:support@rollout.io) to share your thoughts!_ | ||
_And if you don't like it, please let us know what you would like improved, so we can fix it!_ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
713811
17
8940
41
5
Updatedrox-base@^1.2.0