Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
CodeFlask: A micro code-editor for awesome web pages.
You can install CodeFlask via npm:
npm install codeflask
Or use it directly in browser via cdn service:
https://unpkg.com/codeflask/build/codeflask.min.js
import CodeFlask from 'codeflask';
const flask = new CodeFlask('#my-selector', { language: 'js' });
flask.onUpdate((code) => {
// do something with code here.
// this will trigger whenever the code
// in the editor changes.
});
// This will also trigger .onUpdate()
flask.updateCode('const my_new_code_here = "Blabla"');
const code = flask.getCode();
import CodeFlask from 'codeflask';
const flask = new CodeFlask('#my-selector', {
language: 'js',
lineNumbers: true
});
import CodeFlask from 'codeflask';
const flask = new CodeFlask('#my-selector', {
language: 'js',
rtl: true
});
import CodeFlask from 'codeflask';
const flask = new CodeFlask('#my-selector', {
language: 'js',
readonly: true
});
flask.addLanguage('ruby', options)
This API is simply a proxy to add a new language to Prism itself (the code highlighter). The options
parameter must be the same accepted in Prism. You can read more about it here.
By default, CodeFlask supports the following languages (which are also the default supported in Prism):
By default, CodeFlask comes with a simple theme made from scratch called CodeNoon.
You can easily override this theme with your own by writting your own CSS and adding it to your project. If that's the case, you should also disable CodeNoon with the defaultTheme
option:
import CodeFlask from 'codeflask';
const flask = new CodeFlask('#my-selector', {
language: 'js',
defaultTheme: false
});
CodeFlask.js was made possible by awesome open-source projects such as Prism.js and Rollup.
FAQs
A micro code-editor for awesome web pages
The npm package codeflask receives a total of 6,568 weekly downloads. As such, codeflask popularity was classified as popular.
We found that codeflask 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.