Skip to the content.

UltiRequiem’s JavaScript Modules

Hi everyone 👋

I’m Eliaz, a Peruvian Software Developer who loves creating Open Source.

Add Query Params

Site - Repository

Code Coverage Deno Doc

Add Query Parameters to an URL.

import { addParams } from "https://deno.land/x/add_params/mod.ts";

addParams("https://ultirequiem.com", { page: 33, author: "Me", share: false });
//=> https://ultirequiem.com/?page=33&author=Me&share=false

Site - Repository

Code Coverage Deno Doc

Generate a Google Drive direct download link based on the URL or ID.

import { driveLink } from "https://deno.land/x/drive_link/mod.ts";

driveLink(
  "https://drive.google.com/file/d/1DvRH-yk1z0HVBK-EmiQeJ_VVh5eHwQXh/view?usp=sharing",
);
//=> "https://drive.google.com/uc?export=download&id=1DvRH-yk1z0HVBK-EmiQeJ_VVh5eHwQXh"

Camel Case

Site - Repository

Code Coverage Deno Doc

Convert a dash/dot/underscore/space separated string to camelCase or PascalCase.

import { camelcase } from "https://deno.land/x/camelcase/mod.ts";

camelCase("foo-bar"); //=> 'fooBar'

camelCase("foo_bar"); //=> 'fooBar'

camelCase("Foo-Bar"); //=> 'fooBar'

camelCase("розовый_пушистый_единорог"); //=> 'розовыйПушистыйЕдинорог'

camelCase("Foo-Bar", { pascalCase: true }); //=> 'FooBar'

camelCase("--foo.bar", { pascalCase: false }); //=> 'fooBar'

camelCase("Foo-BAR", { preserveConsecutiveUppercase: true }); //=> 'fooBAR'

camelCase("fooBAR", { pascalCase: true, preserveConsecutiveUppercase: true }); //=> 'FooBAR'

camelCase("foo bar"); //=> 'fooBar'

camelCase(["foo", "bar"]); //=> 'fooBar'

camelCase(["__foo__", "--bar"], { pascalCase: true }); //=> 'FooBar'

camelCase(["foo", "BAR"], {
  pascalCase: true,
  preserveConsecutiveUppercase: true,
}); //=> 'FooBAR'

camelCase("lorem-ipsum", { locale: "en-US" }); //=> 'loremIpsum'

Last Item

Code Coverage Deno Doc

Site - Repository

Get the last item of an array, faster than Array.prototype.slice/Array.project.at.

import { lastItem } from "https://deno.land/x/last_item/mod.ts";

const numbers = [1, 2, 3, 4, 5];

lastItem(numbers); //=> 5

lastItem(numbers, 3); //=> [3, 4 , 5]

Fibonacci

Code Coverage Deno Docs

Site - Repository

Compute the Fibonacci Succession and NTH Fibonacci Number.

import {
  fibonacci,
  fibonacciSequence,
} from "https://deno.land/x/fibonacci/mod.ts";

fibonacci(10); //=> 55

fibonacci(5); //=> 5

// First 10 Fibonacci Numbers
for (const fiboNumber of fibonacciSequence(9)) {
  console.log(fiboNumber);
}

console.log(`My favorites numbers are ${[...fibonacciSequence(3)]}.`);

Licence

All these modules are licensed by the MIT License 📄