Block or Report
Block or report monkpit
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned
-
-
Cross product of 2 javascript arrays
Cross product of 2 javascript arrays 1const {equals, flatten, join, map, pipe, unnest, xprod} = require('ramda');
2const xprod2 = require('./xprod.js');
34const urls = [
5'stackexchange.com',
-
NewRelic deploy via browser JS
NewRelic deploy via browser JS 1step('Trigger NewRelic marker', async (b: Browser) => {
2const description = `Flood run started - ${ENV.FLOOD_SEQUENCE_ID}`;
3await b.page.evaluate(
4(_description, sequenceId) => {
5const applicationId = '123';
-
Typed Immutable Sort
Typed Immutable Sort 1export const immutableSort = <T>(array: T[], comparatorFn?: (a: T, b: T) => number): T[] =>
2[...array].sort(comparatorFn);
34describe('immutableSort', () => {
5const testData = [4, 2, 5, -1, 0];
-
Pluck props from array of objects wi...
Pluck props from array of objects with JQ 1echo '[
2{"a": "a", "b": "b", "c": "c"},
3{"a": "1", "b": "2", "c": "3"},
4{"a": "x", "b": "y", "c": "z"}
5]' | jq ".[] | {b, c}"
-
Numeric Prop Sorter - given a prop a...
Numeric Prop Sorter - given a prop and an optional callback (for when equal values will be sub-sorted), returns a function to be passed to Array.sort 1/**
2* Creates a sort function that will compare based upon a certain property in an object.
3*
4* @param {keyof T} prop - the property of the object to sort by
5* @param [options.order] the order to sort - either 'asc' or 'desc'
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.