Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
An experimental rule system handy for intepreting user input, great for adding conversational features to apps, using lessons learned from the message router pattern. I thought of it as I walked around Prague on a sunny Spring day. This is just an experiment and not an official Microsoft project.
Major features of Prague:
Some types of applications you could build with Prague:
npm install
npm run build
(or npm run watch
to build on file changes)npm install prague -S
npm install file:../path/to/your/repo
import { the, stuff, you, want } from 'prague'
or import * as Prague from 'prague'
Let's write a simple bot:
const rule = reply("Hello!");
const rule = rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
const rule = rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!"));
rule(matchRegExp(/I am (.*)/), reply("Nice to meet you!")),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), match => match.reply(`Nice to meet you, ${match.groups[1]}!`)),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), match => match.groups[1] === 'Bill', match => match.reply(`HELLO MY CREATOR`)),
rule(matchRegExp(/I am (.*)/), match => match.reply(`Nice to meet you, ${match.groups[1]}!`)),
reply("I don't understand you.")
)
const rule = first(
rule(matchRegExp(/Hello|Hi|Wassup/), reply("Hello!")),
rule(matchRegExp(/I am (.*)/), first(
rule(match => match.groups[1] === 'Bill', match => match.reply(`HELLO MY CREATOR`)),
rule(match => match.reply(`Nice to meet you, ${match.groups[1]}!`))
)),
reply("I don't understand you.")
)
Any Matcher or Handler may optionally return a Promise or an Observable.
Now that you've been introduced to Rules, Matchers, and Handlers, the key helpers, and the type system, we can look into what it takes to build more complex apps using state.
Here I'll talk about Prompts.
FAQs
FP helpers for games and chatbots
The npm package prague receives a total of 104 weekly downloads. As such, prague popularity was classified as not popular.
We found that prague demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.