knowitwhenyouseeit
v2.42.4
Published
provides functions to render client-side data but only if it matches a secure digest
Downloads
517
Readme
knowitwhenyouseeit
provides functions to render client-side data but only if it matches a secure digest
View knowitwhenyouseeit on npm
Install
yarn add knowitwhenyouseeitUsage
import allowlist from 'knowitwhenyouseeit';
export const getMessage = allowlist(
'$2y$12$BcuZ0VfUeLLpoLxOC5Xv7eQQK0r95by8YJsECCldKP4ftPr20rpXW', // hello world
'$2y$12$hxyWxMx.qap70Snn1QKMwuDp/9XgNM7HpwbrGnsPu/j7dyTEWh0M2' // hewwo world
);
getMessage('helllo world!'); // false
getMessage('hello world'); // "hello world"License
MIT © zemnmez
