hacknlove
hacknlove
What am I missing here? ``` const fetch = require("node-fetch"); jest.mock("node-fetch", () => require("fetch-mock-jest").sandbox()); const fetchMock = require("fetch-mock-jest"); describe("bug", () => { it("should work!", async () => { fetchMock.get("/foo", {...
I am using casual to generate seeded random data to be inserted in mongo, to do tests. I need predictable ObjectId. I am using casual.random to create the ObjectId on...
… '%3A' at every string delimitator **What is the purpose of this pull request? (put an "X" next to item)** [ ] Documentation update [ ] Bug fix [x] New...
#Some times I get no transcriptions in one video. Other Times I managed to get transcriptions in both videos, but then, one of them is not responding to track changes...
videojs has no more `captionstrackchange` and `subtitlestrackchange` events I managed to get around with: ```javascript player.textTracks().on('change', _.debounce(function () { setTimeout(function () { player.trigger('subtitlestrackchange') }, 0) }, 1000, true)) ```
nextjs
Do you think it's a good idea to add a nextjs version?
``` > const { DOMParser } = require("linkedom"); undefined > const parser = new DOMParser(); undefined > parser.parseFromString(`(() => {if (5>4) { console.log('hello') }})()`).toString() `(() => {if (5>4) { console.log('hello')...
Is this still maintained?
``` const { parse } = require('esprima'); const staticEval = require('static-eval'); const ast = parse('(() => 1)()'); const val = staticEval(ast.body[0].expression, {}, { allowAccessToMethodsOnFunctions: true }); // val is undefined...