Skip to content

Instantly share code, notes, and snippets.

export function getFieldById(id: AssessmentFieldId): AssessmentField {
switch (id.type) {
case 'checklist-comment':
return checklistCommentField(id.key);
case 'document-environmental-effects':
return documentEnvironmentalEffectsAssessment(id.documentId);
case 'document-objectives-and-policies':
return documentObjectivesAndPoliciesAssessment(id.documentId);
case 'document-standard':
return documentStandardAssessment(id.standardId);
const publicSteps = [
{
name: 'Step 1 - Mandatory public notification in certain circumstances',
outcomes: [
{
value: 'required',
description: 'Required',
},
{
value: null,
{
"env": {
"test": {
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3
}
{
"javascriptEnabled": true
}
@import "../node_modules/antd/dist/antd.less";
// Used by Ant design
@primary-color: #fd6f26;
@text-color: #343434;
@layout-body-background: #ffffff;
@layout-header-background: #343434;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/assets/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="assets/manifest.json" />
<link rel="stylesheet" href="src/index.less" />
console.log(
JSON.stringify({
name: 'Resource Consent Application & Assessment of Environmental Effects',
title: 'Resource Consent Application & Assessment of Environmental Effects',
template: [
{
type: 'component',
componentName: 'TitlePage',
},
{
export default [
{
name: 'Resource Consent Application & Assessment of Environmental Effects',
title: 'Resource Consent Application & Assessment of Environmental Effects',
template: [
{
type: 'component',
componentName: 'TitlePage',
},
{
const { Crypto } = require("@peculiar/webcrypto");
global.crypto = new Crypto();
require("fast-text-encoding");
const jsdom = require("jsdom");
const { window } = new jsdom.JSDOM(``, { runScripts: "outside-only" });
global.btoa = window.btoa;
global.atob = window.atob;
const SALT = "247 213 94 9 15 236 156 48 194 177 107 216 198 215 169 239";
from functools import partial
from stringcase import snakecase
def recursively_convert_keys(conversion_fun, data):
"""
The first major change we're making is pulling the type check out of the loop. This reduces the number of cases
which we need to handle, and allows us to run the conversion with a dictionary or a list.
The second change is that we're not mutating the original input. This simplifies things because we don't have
to delete the old keys, and we don't need to worry about breaking things in code elsewhere.
"""