2024-01-20 19:19:02 -05:00
|
|
|
// skeleton.js
|
|
|
|
|
2024-01-20 18:33:31 -05:00
|
|
|
document.addEventListener('DOMContentLoaded', function initJs () {
|
|
|
|
console.log('Hello, world!')
|
|
|
|
})
|
2024-06-24 12:24:19 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// skeleton-script.js
|
2024-06-24 12:32:46 -04:00
|
|
|
// See: https://bun.sh/docs/runtime/shell
|
2024-06-24 12:24:19 -04:00
|
|
|
|
|
|
|
#!/usr/bin/env bun
|
|
|
|
|
2024-06-24 12:32:46 -04:00
|
|
|
import { $ } from 'bun'
|
2024-06-24 12:24:19 -04:00
|
|
|
|
|
|
|
const lines = $`ls`.lines()
|
|
|
|
|
2024-06-24 12:32:46 -04:00
|
|
|
for await (const line of lines) {
|
|
|
|
console.log(line)
|
2024-06-24 12:24:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
const lineArray = await Array.fromAsync(lines)
|
2024-06-24 12:32:46 -04:00
|
|
|
console.log(lineArray.filter(s => s.startsWith('D')))
|