dan.the.discloser
dan.the.discloser
DDeno
Created by dan.the.discloser on 6/6/2024 in #help
is there a deno CSS linter?
is there a deno CSS linter?
2 replies
DDeno
Created by dan.the.discloser on 5/4/2024 in #help
what's the best tool set to use for testing react components in Deno?
Ideally something very fast for TDD.
3 replies
DDeno
Created by dan.the.discloser on 7/10/2023 in #help
how do I launch a FRESH application under the debugger in VSCODE
Can I use "watch" if I do?
1 replies
DDeno
Created by dan.the.discloser on 4/7/2023 in #help
Is it easy to use deno for expo/react-native?
Is there a boiler-plate or simple example?
1 replies
DDeno
Created by dan.the.discloser on 3/21/2023 in #help
client side JS
If I am using "lodash" on the client side, do I need to have a path for the browser to get it from NPM repository the way I wold if I wasn't using deno?
11 replies
DDeno
Created by dan.the.discloser on 1/6/2023 in #help
using both nodejs & deno
I have to turn in my class assignments in nodejs. I am happier with deno. Is there a standard way to write code so that the same code base can be used both ways? My naive though would to hide the differences behind maps. Is there a better way to accomplish this?
8 replies
DDeno
Created by dan.the.discloser on 12/20/2022 in #help
get in oak
In oak, how do I check whether a request is the root? It - starts with slash - is of length 1 but is NOT equal to "/"
app.use(async (ctx, next) => {
console.log({pathname: ctx.request.url.pathname})
const starts_with_slash = ctx.request.url.pathname.startsWith("/")
const is_not_slash = (!ctx.request.url.pathname != "/")
const the_length = ctx.request.url.pathname.length

console.log({starts_with_slash})
console.log({is_not_slash})
console.log({the_length})
...})

app.use(async (ctx, next) => {
console.log({pathname: ctx.request.url.pathname})
const starts_with_slash = ctx.request.url.pathname.startsWith("/")
const is_not_slash = (!ctx.request.url.pathname != "/")
const the_length = ctx.request.url.pathname.length

console.log({starts_with_slash})
console.log({is_not_slash})
console.log({the_length})
...})

console output
{ pathname: "/" }
{ starts_with_slash: true }
{ is_not_slash: true }
{ the_length: 1 }
{ pathname: "/" }
{ starts_with_slash: true }
{ is_not_slash: true }
{ the_length: 1 }
2 replies
DDeno
Created by dan.the.discloser on 11/25/2022 in #help
deps.ts & importMap.json
I a looking at system in ultra1 What determine what should go in importMap.json vs what sdhould go in deps.ts`
4 replies
DDeno
Created by dan.the.discloser on 11/25/2022 in #help
OR interfaces?
What should EITHER mean?
interface ONE {
one: number;
i: string;
}
interface TWO {
two: number;
j: string;
}

type EITHER = ONE | TWO;
interface ONE {
one: number;
i: string;
}
interface TWO {
two: number;
j: string;
}

type EITHER = ONE | TWO;
EITHER seems to accept anything that has * ALL the elements of either ONE or TWO, along with * zero or more elements of the other.
6 replies
DDeno
Created by dan.the.discloser on 11/21/2022 in #help
drag and drop
Is there particular drag and drop library that the Deno community tends to use? something like draggable.js or react-beautiful-dnd ?
5 replies
DDeno
Created by dan.the.discloser on 11/6/2022 in #help
File name conventions
Some of my .ts files are meant to be run from the command line. Some of them when imported do things (like read .env files) Is there a file naming convention for such things?
3 replies
DDeno
Created by dan.the.discloser on 10/29/2022 in #help
mongodb calls on DB's rather than collections
When I do a find on a mongoclient rather than a collection
clnt: MongoClient,

...

const fullCollectionCursorPair = await clnt.runCommand(dbname, {
find: collectionName,
filter: {},
});
clnt: MongoClient,

...

const fullCollectionCursorPair = await clnt.runCommand(dbname, {
find: collectionName,
filter: {},
});
I get a cursor with the proper looking data but without .hasNext() , .next() .map() or .toArray() defined on it as I would if I was using collection.find Is there a way for me to attach them? It looks like this normally defined in class CommandCursor<T> in denodrivers/mongo/src/protocol/
2 replies
DDeno
Created by dan.the.discloser on 10/26/2022 in #help
can i bypass strict mode?
When I try use Deno Run , it complains error: Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them const answer = o[s];
export function func(o: object, s : string) {
const answer = o[s];
return answer}
export function func(o: object, s : string) {
const answer = o[s];
return answer}
^
9 replies
DDeno
Created by dan.the.discloser on 10/25/2022 in #help
piping for async sub process
In Deno.process, is there a way to set its STDOUT to something I can read line by line while that primary process is still running?
18 replies
DDeno
Created by dan.the.discloser on 10/25/2022 in #help
Code Pilot
I was just reading about copilot https://docs.github.com/en/copilot any issues with using it with Deno and/or Deno mode is Visual Studio Code?
4 replies
DDeno
Created by dan.the.discloser on 10/25/2022 in #help
How do I wait for the long running shell script to finish?
When I do this, await returns immediately.
const D = await Deno.run({cmd: ["sh", "long-running-script"]});
console.log(D)
const D = await Deno.run({cmd: ["sh", "long-running-script"]});
console.log(D)
5 replies
DDeno
Created by dan.the.discloser on 10/23/2022 in #help
is there a way to make deno check produce json files?
deno lint has a --json flag. is there a way to json output for deno check
1 replies
DDeno
Created by dan.the.discloser on 10/23/2022 in #help
Function Location
5 replies
DDeno
Created by dan.the.discloser on 10/22/2022 in #help
Environment Variables & Args for Deno Testing in Visual Code Studio
For running tests, My testing task in deno.json is ``` { "tasks": { "test": "ENVIRON=TEST deno test --allow-all", ...}}
3 replies
DDeno
Created by dan.the.discloser on 10/22/2022 in #help
Deno BDD Testing in Visual Code Studio
I just install Visual Code Studio and loaded the Deno support for it. In my testing I have been using describe and it rather than Deno.test. I get the lense to run tests with with Deno.test is there any way to get it for describe and it
2 replies