With registered links
#hasAny
✅ is true
#all
✅ is a list of all registered links
Without registered links
#hasAny
✅ is false
#all
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"workbench.activityBar.visible": false, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"search.exclude": { | |
"**/.git": true, | |
"**/node_modules": true, | |
"**/bower_components": true, | |
"**/.tmp": true, | |
"**/.DS_Store": true |
# Creating folder jumping on the created folder
mkdir multiple-package-versions-in-project && \
cd multiple-package-versions-in-project \
# Starting a NPM project
npm init -y && \
# Installing old & new versions of `feature-toggle-service` package
npm install --save \
feature-toggle-service@npm:[email protected] \
feature-toggle-service-next@npm:[email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { isOn, set } = require('feature-toggle-service'); | |
const { isOn: isOnNext, set: setNext } = require('feature-toggle-service-next'); | |
const defaultConfig = { enableFirstSection: true }; | |
set(defaultConfig); | |
setNext(defaultConfig); | |
// ❌ Old version: does NOT have a `debug` option | |
console.log(isOn('enableFirstSection')); | |
// ✅ Latest version: does have a `debug` option available |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "multiple-versions-of-package-in-project", | |
"version": "1.0.0", | |
"description": "Using multiple versions of the same package in a project", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"keywords": [], | |
"author": "Will Mendes <[email protected]>", |
- Install the packages (old and latest versions) adding a specific name/namespace for the latest one
npm install --save \
feature-toggle-service@npm:[email protected] \
feature-toggle-service-next@npm:[email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Link for example in Typescript playground | |
// https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABAcwKZQMIODZAKAWAChFTEJtcB+ALkQG9iznEBDAB3dVYCdXJUtRAGcoPGGGQBuJi1L8YAW1awEQ0eMkyScxABs4rACYTkAFVQAPKOrGntu8nHA26YEIoBGqHg91QAC1RFQTp6AG0AazoNUwBdOn4ATwBfRAAfRHc9PT9SFOIASjoANzgYIwZZUgowUQYOLl5+CFREAF5EAHI9CVQugBo2MCUVeCROrvYeOGQeVGFhQcRA4LbO7L0hg2NTC2sO7oAZQxNJADpL5YoXQ4BGNM7anGQMzPoU7WqnOrg9VHOBnwjW4fAEQwUylUYCGqxC21OeysUCGNzAUEK2gKRGIoEg0JQ6CwYBeACZCDoapRkEJGJSWCDmgJbJppN9mJCxmoYnYtOyyDszuZkSz7PyqS4hO4vD48iw4aEGFEeayEsNUhksiAcnLscVEGUKlV6bV6oywa1Ds9qOdzS02lQqN1emB+nLTVBhqMCU9qVRbSMoeNEI7utNZvNFl13Qh6gqrX7zvHQ5sY3VPYKkQdfSSbZnJPtPaGuiddhcrmn6mjPTmXv7qyGnXcvibY38AUC8HbwV6gwhYUF4fpEQXkajnOjMcRsbjwNBg2hMNSAMwU5jWmlhcVsTig+2ivn0jmBrlgA9so8CkfC6znuXrieuLUy3zbhW05UiXnINXJNKZVNvj1UpykqOkH3TBpdyZS1JhdfoIRPH0wxmOYFiWAc1kOTYETLG8a2Oa9LnOa5H3uR4fheRsGE+YhvlNdtAVmLtoItVBEO9cZMKHfN8PHFwpyIFIgA | |
function getConfig( | |
config?: { | |
appearance?: string; | |
animation?: string; | |
loadingText?: string; | |
node example.js | pino-sanitize -u=":{UUID}" -h=":{HASH}" -q=":{QUERY-STRING}" -k="err,msg,stack"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const pino = require('pino')(); | |
const uuid = 'fe35c68e-1648-40a5-8f3a-a7d5ae054261'; | |
const hash = '2cccdfbad40b872c6615c9721d14b904465a424e'; | |
pino.info('hello world'); | |
pino.error('this is at error level'); | |
pino.info('the answer is %d', 42); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-project", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"dependencies": { | |
"launchdarkly-node-server-sdk": "^5.14.3" | |
} | |
} |
NewerOlder