1.0.16 • Published 11 months ago

@bigfootds/bigfootds-shared-data v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

BigfootDS Shared Microservice Data

This package contains data used across multiple services, handled here in an effort to adhere to "D.R.Y" coding principles.

Links

This package is published to these places:

Installation

This is a scoped package, so its install command looks a little longer than normal. But it means you can guarantee that you'll be getting the package from BigfootDS!

npm install @bigfootds/bigfootds-shared-data

Basic Usage

Import the package and use it as an object:

const bdsSharedData = require('@bigfootds/bigfootds-shared-data');

console.log("Top-level items in the package are:")
console.log(Object.keys(bdsSharedData));
console.log("Items within the WordBlacklists object are:")
console.log(Object.keys(bdsSharedData.WordBlacklists))

Output:

Top-level items in the package are:
[ 'WordBlacklists' ]
Items within the WordBlacklists object are:
[ 'ProfanityWords', 'DeveloperReserved' ]

Use the data appropriately!

let profaneWord = "fuck";

if (bdsSharedData.WordBlacklists.ProfanityWords.includes(profaneWord)){
	console.log("Profanity detected: " + profaneWord);
}

Output:

Profanity detected: fuck

Object destructuring syntax is fine to use, too.

const {WordBlacklists} = require('@bigfootds/bigfootds-shared-data');

console.log("Items within the WordBlacklists object are:")
console.log(Object.keys(WordBlacklists))

let profaneWord = "fuck";

if (WordBlacklists.ProfanityWords.includes(profaneWord)){
	console.log("Profanity detected: " + profaneWord);
}

Output:

Items within the WordBlacklists object are:
[ 'ProfanityWords', 'DeveloperReserved' ]
Profanity detected: fuck
1.0.16

11 months ago

1.0.9

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago