Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feature-toggle-service

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feature-toggle-service - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

CHANGELOG.md

4

lib/feature-toggle-service.d.ts
declare const isOn: (key: string) => boolean;
declare const setConfigurationObject: (obj: any) => void;
export { isOn, setConfigurationObject };
declare const set: (obj: any) => void;
export { isOn, set };
/*!
* feature-toggle-service.js v3.0.0
* feature-toggle-service.js v4.0.0
* https://willmendesneto.github.io/feature-toggle-service.js

@@ -28,6 +28,6 @@ *

exports.isOn = isOn;
var setConfigurationObject = function setConfigurationObject(obj) {
var set = function set(obj) {
settings = obj;
};
exports.setConfigurationObject = setConfigurationObject;
exports.set = set;
});
/*!
* feature-toggle-service.js v3.0.0
* feature-toggle-service.js v4.0.0
* https://willmendesneto.github.io/feature-toggle-service.js

@@ -7,2 +7,2 @@ *

*/
!function(e,t){if("function"==typeof define&&define.amd)define("FeatureToggleService",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={};t(n),e.FeatureToggleService=n}}(this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},t=function e(t){return!!n[t]};e.isOn=t;var i=function e(t){n=t};e.setConfigurationObject=i});
!function(e,t){if("function"==typeof define&&define.amd)define("FeatureToggleService",["exports"],t);else if("undefined"!=typeof exports)t(exports);else{var n={};t(n),e.FeatureToggleService=n}}(this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},t=function e(t){return!!n[t]};e.isOn=t;var i=function e(t){n=t};e.set=i});
{
"name": "feature-toggle-service",
"version": "3.0.0",
"version": "4.0.0",
"author": "Will Mendes <willmendesneto@gmail.com>",

@@ -24,3 +24,3 @@ "description": "The simplest solution for feature toggle in Javascript. Simple how it should be.",

"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-loader": "^8.0.3",
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1",

@@ -37,15 +37,12 @@ "babel-plugin-transform-es2015-modules-umd": "^6.24.1",

"bundlesize": "^0.17.0",
"commitizen": "^2.9.6",
"conventional-changelog-cli": "^1.3.1",
"cz-conventional-changelog": "^2.0.0",
"ghooks": "^2.0.0",
"changelog-verify": "^1.1.0",
"mocha": "^5.0.0",
"mustache": "^2.3.0",
"nyc": "^11.0.2",
"ts-node": "^6.0.0",
"mustache": "^3.0.0",
"nyc": "^13.0.1",
"ts-node": "^7.0.0",
"tslint": "^5.4.3",
"typescript": "^2.3.4",
"typescript": "^3.1.1",
"typings": "^2.1.1",
"uglify-js": "^3.0.10",
"validate-commit-msg": "^2.12.1"
"version-changelog": "^3.1.0"
},

@@ -59,3 +56,2 @@ "engines": {

"build-min": "uglifyjs lib/feature-toggle-service.js --comments '/!/' -m --screw-ie8=true -c unused=false -o lib/feature-toggle-service.min.js",
"commit": "git-cz",
"pretest": "tslint src",

@@ -66,23 +62,11 @@ "test": "npm run compile && NODE_ENV=test nyc --reporter=lcov --reporter=text-summary mocha ./test/*.spec.js --require ./test/setup.js",

"generate-banner": "node generate-banner.js",
"bundlesize": "bundlesize"
"bundlesize": "bundlesize",
"version": "version-changelog CHANGELOG.md && changelog-verify CHANGELOG.md && git add CHANGELOG.md"
},
"config": {
"ghooks": {
"pre-commit": "! git --no-pager grep --cached -nE '^\\s*?(describe|it).only' -- ./test/*.js",
"post-merge": "git --no-pager diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD | grep -q 'package.json' && npm install",
"commit-msg": "validate-commit-msg"
},
"validate-commit-msg": {
"helpMessage": "If you are unsure on how to structure your commit message, execute 'npm run commit' for a step-by-step."
},
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
},
"bundlesize": [
{
"path": "./lib/feature-toggle-service.min.js",
"maxSize": "333B"
"maxSize": "322B"
}
]
}

@@ -15,6 +15,4 @@ # Feature Toggle Service

The simplest solution for [feature toggles](http://martinfowler.com/bliki/FeatureToggle.html) in Javascript. Simple how it should be.
## Why Feature toggle?

@@ -25,2 +23,3 @@

The idea of this directive is make this process transparent and easier. So the main point is integrate this directive with other tooling process, such as:
- Server-side rendering;

@@ -32,3 +31,2 @@ - Progressive rendering;

## Setup and installation

@@ -68,3 +66,2 @@

## Run the app

@@ -76,3 +73,2 @@

## Run the tests

@@ -84,3 +80,2 @@

## Run the build

@@ -96,20 +91,16 @@

### `featureToggleService.setConfigurationObject(obj)`
### `featureToggleService.set(obj)`
Adds the feature toggle configuration in your application. This information will be private and checked via `featureToggleService.isOn(key)` and `featureToggleService.isOff(key)` methods.
Adds the feature toggle configuration in your application. This information will be private and checked via `featureToggleService.isOn(key)` method.
### `featureToggleService.isOn(key)`
Checks if the feature toggle configuration has the string key value with `true` value.
Checks if the feature toggle configuration has the string key value with `true` value. For bundle reasons if you want to check if the feature toggle is turned off, please use `!featureToggleService.isOn(key)`
### `featureToggleService.isOff(key)`
Checks if the feature toggle configuration does not have the string key value with `true` value.
## Author
**Wilson Mendes (willmendesneto)**
+ <https://plus.google.com/+WilsonMendes>
+ <https://twitter.com/willmendesneto>
+ <http://github.com/willmendesneto>
- <https://plus.google.com/+WilsonMendes>
- <https://twitter.com/willmendesneto>
- <http://github.com/willmendesneto>
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc