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

creature-features

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creature-features - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

3

.vscode/settings.json

@@ -10,3 +10,6 @@ {

"titleBar.inactiveBackground": "#01a11688"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}

12

index.js

@@ -8,3 +8,3 @@ const path = require('path')

module.exports = function(config) {
module.exports = function (config) {
let env

@@ -14,3 +14,3 @@ let featuresFile

let defaults = {
location: path.join(process.cwd(), './features/')
location: path.join(process.cwd(), './features/'),
}

@@ -60,4 +60,4 @@

const requiredFeatures = featuresFiles
.filter(f => exists(f))
.map(function(file) {
.filter((f) => exists(f))
.map(function (file) {
return require(file)

@@ -89,3 +89,3 @@ })

}
const range = obj[prop].range.map(v => v / 100)
const range = obj[prop].range.map((v) => v / 100)
return random(range) === 0

@@ -123,3 +123,3 @@ }

throw new Error('Not allowed to set a value')
}
},
})

@@ -126,0 +126,0 @@

{
"name": "creature-features",
"version": "5.0.0",
"version": "5.1.0",
"description": "Feature flags for node.js",

@@ -42,13 +42,13 @@ "main": "index.js",

"@kev_nz/publisher": "^4.0.1",
"coveralls": "^3.0.6",
"cross-env": "^5.2.1",
"eslint": "^6.4.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.0",
"jest": "^24.9.0",
"prettier": "^1.18.2"
"coveralls": "^3.1.1",
"cross-env": "^7.0.3",
"eslint": "^7.31.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^27.0.6",
"prettier": "^2.3.2"
},
"dependencies": {
"debug": "^4.1.1",
"debug": "^4.3.2",
"end-with": "^1.0.2",

@@ -55,0 +55,0 @@ "file-exists": "^5.0.1",

@@ -44,3 +44,3 @@ describe('The Default Behavior of the Module', () => {

const locationFeatures = creature({
location: './test/features/'
location: './test/features/',
})

@@ -56,3 +56,3 @@ expect(locationFeatures.Location).toBe(true)

const locationFeatures = creature({
location: './test/features'
location: './test/features',
})

@@ -68,3 +68,3 @@ expect(locationFeatures.Location).toBe(true)

const locationFeatures = creature({
location: './test/features'
location: './test/features',
})

@@ -79,3 +79,3 @@ expect(locationFeatures[Symbol('tester')]).toBe(false)

location: './test/features/',
env: 'development'
env: 'development',
})

@@ -91,3 +91,3 @@

const locationFeatures = creature({
location: './test/features'
location: './test/features',
})

@@ -103,3 +103,3 @@ expect(locationFeatures.Location).toBe(true)

const locationFeatures = creature({
location: './test/features/'
location: './test/features/',
})

@@ -106,0 +106,0 @@ expect(locationFeatures.Location).toBe(true)

@@ -40,3 +40,3 @@ describe('The Default Behavior of the Module', () => {

const locationFeatures = creature({
location: './test/features/'
location: './test/features/',
})

@@ -43,0 +43,0 @@

const creature = require('../index')
const locationFeatures = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -30,3 +30,3 @@

const locationFeatures = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -64,3 +64,3 @@ end('start', hrstart, start)

test('Test one call versus one handmade call', async () => {
const returner = name => {
const returner = (name) => {
if (name === 'nope@example.com') return true

@@ -67,0 +67,0 @@ return false

@@ -5,3 +5,3 @@ describe('Feature based on rules', () => {

const locationFeatures = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -16,3 +16,3 @@

const locationFeatures = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -23,3 +23,3 @@

email: 'test@example.com',
role: 'admin'
role: 'admin',
})

@@ -30,3 +30,3 @@ ).toBe(true)

email: 'nope@example.com',
role: 'user'
role: 'user',
})

@@ -39,3 +39,3 @@ ).toBe(false)

const locationFeatures = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -46,3 +46,3 @@

email: 'test@example.com',
role: 'admin'
role: 'admin',
})

@@ -54,3 +54,3 @@ ).toBe(true)

email: 'nope@example.com',
role: 'user'
role: 'user',
})

@@ -57,0 +57,0 @@ ).toBe(false)

@@ -5,3 +5,3 @@ describe('Feature based on percents', () => {

const features = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -20,3 +20,3 @@ let trueTotal = 0

const features = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -37,3 +37,3 @@ let trueTotal = 0

const features = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -47,3 +47,3 @@

const features = creature({
location: './test/features/rules'
location: './test/features/rules',
})

@@ -50,0 +50,0 @@ let trueTotal = 0

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