ChibraxOS 2

Changes:
- kernel 6.0.2
- Broken init scripts
- Switch to bun for better peroformance an easier ffi
- Removed grup
- Efi support without graphics (at least graphics werent tested)
- Suppression de toutes les dépendance non libc
- new splash
- broken audio
- typescript support
- ls rewritten to be more reliable
This commit is contained in:
Marc
2022-10-22 13:47:33 +02:00
parent db49f8d205
commit 721c919c7b
76 changed files with 2485 additions and 2665 deletions
+1 -33
View File
@@ -1,41 +1,9 @@
//@ts-check
/**
* @param {string} str
* @returns { Promise<string> }
*/
async function getline(str) {
process.stdout.write(str)
process.stdin.resume()
process.stdin.setEncoding('utf8')
let line = ""
return new Promise((res, rej) => {
process.stdin.on('data', function(chunk) {
line += chunk
if (chunk.toString('utf-8').endsWith('\n')) {
process.stdin.pause()
res(line.substring(0, line.length -1))
}
})
process.stdin.on('error', function(err) {
rej(err)
})
})
}
/**
* @param { string } str
* @returns
*/
function isAlpha(str){
export function isAlpha(str){
return /^[a-zA-Z]*$/.test(str)
}
module.exports = {
isAlpha, getline
}