github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/functions-pp/nodejs/functions.ts (about)

     1  import * as pulumi from "@pulumi/pulumi";
     2  import * as aws from "@pulumi/aws";
     3  
     4  const encoded = Buffer.from("haha business").toString("base64");
     5  const decoded = Buffer.from(encoded, "base64").toString("utf8");
     6  const joined = [
     7      encoded,
     8      decoded,
     9      "2",
    10  ].join("-");
    11  const bucket = new aws.s3.Bucket("bucket", {});
    12  const encoded2 = bucket.id.apply(id => Buffer.from(id).toString("base64"));
    13  const decoded2 = bucket.id.apply(id => Buffer.from(id, "base64").toString("utf8"));