Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
In order to design a piece of software we need to “design” the team that is going to produce it.
import { NextRequest, NextResponse } from 'next/server'; | |
export async function POST(request: NextRequest, res: NextResponse) { | |
const data = await request.json(); | |
switch (data.level) { | |
case 'error': | |
console.error(data); | |
break; | |
case 'warn': | |
console.warn(data); |
Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.
In order to design a piece of software we need to “design” the team that is going to produce it.
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.lane :retrieve_fastlane_session do | |
# runs shell | |
# this needs SPACESHIP_SKIP_2FA_UPGRADE=1 flag | |
spaceauth_output = `bundle exec fastlane spaceauth` | |
# regex the output for the value we need | |
fastlane_session_regex = %r{Pass the following via the FASTLANE_SESSION environment variable:\n(?<session>.+)\n\n\nExample:\n.+} | |
new_session = nil | |
if match = spaceauth_output.match(fastlane_session_regex) | |
# strip out the fancy formatting |
source code was moved into github repository: https://github.com/Svehla/TS_DeepMerge
export const omit = <T extends Record<string, unknown>, K extends [...(keyof T)[]]>( | |
originalObject: T, | |
keysToOmit: K, | |
): { | |
[K2 in Exclude<keyof T, K[number]>]: T[K2]; | |
} => { | |
const clonedObject = { ...originalObject }; | |
for (const path of keysToOmit) { | |
delete clonedObject[path]; |
invoices/123
?
in a URL like /assignments?showGrades=1
.#
portion of the URL. This is not available to servers in request.url
so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.const styles = theme => ({ | |
drawer: { | |
position: 'absolute', | |
overflowX: 'hidden', | |
zIndex: theme.zIndex.drawer + 2, | |
[theme.breakpoints.up('sm')]: { | |
position: 'relative', | |
width: drawerWidth, | |
flexShrink: 0, |
import { ApolloServer, gql } from 'apollo-server-micro'; | |
const typeDefs = gql` | |
type Query { | |
sayHello: String | |
} | |
`; | |
const resolvers = { | |
Query: { |