๐ธ Lamby-chan's Moe Moe Kun Maid Cafรฉ Library ๐ธ
Lamby-chan is so excited to see you again!
Welcome, dear customer, to Lamby-chan's Moe Maid Cafรฉ!
We're so excited to present our super kawaii Node library named after our mascot, Lamby! We've lovingly crafted these adorable little ฮป
functions to make your coding experience more delightful and fun!
๐ฐ How to install Lamby-chan's Library
If you want to invite Lamby-chan into your project, just run this magical command:
$ npm install lamby-chan
Now you can enjoy the cuteness overload!
๐ Functions
Here's a menu of our adorable little helper functions! We've prepared some lovely code examples to make your heart go doki-doki!
๐ โจ Identity-chan - id()
๐ ๐
Kyaaa~! Identity-chan is so simple and pure! She just returns the value you give her, like a loyal and loving friend! (เน>แด<เน)
import { id } from 'lamby-chan'
console.log(id('๐โจ')) // '๐โจ'
๐ โจ Currylicious-chan - curry()
๐ ๐ธ
Oooh! Currylicious-chan is just like a warm, delicious curry! She wraps up your functions with a cozy blanket of currying magic! Nyaa~ (เธ ฬหเธ ฬ)
import { curry } from 'lamby-chan'
const sum = (a, b) => a + b
const ๐ = curry(sum)
const add2 = ๐(2)
console.log(add2(3)) // 5
๐ โจ Origami-chan - reduce()
๐ ๐
Meet our precious Origami-chan! She's so talented at folding lists into beautiful shapes! Let her reduce your code into a masterpiece! ูฉ(เนหฬตแดหฬต)ู
import { reduce } from 'lamby-chan'
const sum = (a, b) => a + b
const ๐ธ = reduce(sum, 0, [1, 2, 3, 4, 5])
console.log(๐ธ) // 15
๐ โจ Pipeline-chan - pipe()
๐ ๐
Welcome Pipeline-chan, the magical girl of function transformation! She creates an awe-inspiring, sparkly pipeline just for you! Let's make some kawaii code together! ใฝ(โกโฟโก)ใ
import { pipe, map, filter } from 'lamby-chan'
const mult2 = x => x * 2
const isEven = x => x % 2 === 0
const ๐ = pipe(
map(mult2),
filter(isEven)
)
console.log(๐([1, 2, 3, 4])) // [4, 8]
๐ผ โจ Symphony-chan - compose()
๐ ๐
Introducing the dazzling Symphony-chan! She's the sister of Pipeline-chan and together they create a harmonious and enchanting code experience! Let's compose our dreams! (๏ฝก
import { compose, map, filter } from 'lamby-chan'
const mult3 = x => x * 3
const isOdd = x => x % 2 === 1
const ๐ต = compose(
filter(isOdd),
map(mult3)
)
console.log(๐ต([1, 2, 3, 4])) // [3, 9]
๐ โจ Magical Transformation-chan - map()
๐ ๐
Say hello to our dear Magical Transformation-chan! She's like a fairy godmother, turning your data into something fabulous and sparkly! Let the transformation begin! (โฟโนโกโน)๏พโ
import { map } from 'lamby-chan'
const dbl = x => x * 2
const ๐ = map(๐, [1, 2, 3, 4])
console.log(๐) // [2, 4, 6, 8]
๐ โจ Kawaii Selection-chan - filter()
๐ ๐งก
Presenting our adorable Kawaii Selection-chan! She's here to make sure only the cutest elements stay in your array! Let her choose the most precious ones for you! (๏ฝกโขฬแด-)โง
import { filter } from 'lamby-chan'
const isEven = x => x % 2 === 0
const ๐ญ = filter(๐ญ, [1, 2, 3, 4, 5])
console.log(๐ญ) // [2, 4]
๐ โจ Treasure Hunt-chan - find()
๐ ๐
Meet our lovely Treasure Hunt-chan! She's an expert at finding hidden gems in your arrays! Let her reveal the special one for you! (*๏ผพโฝ๏ผพ)๏ผ
javascript
import { find } from 'lamby-chan'
const zeroOrFive = x => x % 5 === 0
const ๐ = find(zeroOrFive, [1, 2, 3, 4, 5, 6, 7, 8, 9])
console.log(๐) // 5
๐ โจ Dazzling Selection-chan - select()
๐ ๐ค
Introducing the radiant Dazzling Selection-chan! She knows just how to pick the most stunning properties from your objects! Watch her make your code shine! (๏พโใฎโ)๏พ*:๏ฝฅ๏พโง
import { select } from 'lamby-chan'
const props = ['name', 'color']
const obj = { name: 'Lamby-chan', color: 'pink', role: 'mascot' }
const โจ = select( props, obj)
console.log(โจ) // { name: 'Lamby-chan', color: 'pink' }
๐ โจ Berry Twist-chan - reverse()
๐ โค๏ธ
Say hello to our sweet Berry Twist-chan! She loves to flip your arrays and create a delightful surprise! Let's see what she can do! (โงโฝโฆ)
import { reverse } from 'lamby-chan'
const array = [1, 2, 3, 4, 5]
const ๐ช๏ธ = reverse(array)
console.log(๐ช๏ธ) // [5, 4, 3, 2, 1]
๐ฉ โจ Donut-chan - pick()
๐ ๐ช
Get ready for the sweetest Donut-chan! She's here to pick the yummiest properties from your array of objects! Let's make your code extra delicious! (โโฝโ)โ
import { pick } from 'lamby-chan'
const prop = 'flavor'
const ๐ฉ = [
{ flavor: '๐', price: 2 },
{ flavor: '๐ซ', price: 3 },
{ flavor: '๐ซ', price: 2.5 }
]
const flavors = pick(prop, ๐ฉ)
console.log(flavors) // ['๐', '๐ซ', '๐ซ']
๐ โจ Moonbeam-chan - uniq()
๐ ๐
Welcoming the enchanting Moonbeam-chan! She's here to make your arrays sparkle with unique elements! Let her light up your code with her magic! (๏พยดใฎ`)๏พ*: ๏ฝฅ๏พ
import { uniq } from 'lamby-chan'
const array = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]
const ๐ = uniq(array)
console.log(๐) // [1, 2, 3, 4, 5]
๐ โจ Ocean Breeze-chan - trim()
๐ ๐๏ธ
Introducing our refreshing Ocean Breeze-chan! She's here to trim away any extra whitespace from your strings! Let her bring a fresh touch to your code! (ใฃหฯหฯ )
import { trim } from 'lamby-chan'
const stringWithSpaces = ' hello, world! '
const ๐๏ธ = trim(stringWithSpaces)
console.log(๐๏ธ) // 'hello, world!'
๐ต๏ธ โจ Blossom-chan - compact()
๐ ๐บ
Meet our lovely Blossom-chan! She's here to make your arrays bloom by removing any falsy values! Let her bring the beauty of spring to your code! (โฟโ โฟโ )
import { compact } from 'lamby-chan'
const array = [1, null, 2, false, 3, undefined, 4, '', 5]
const ๐ท = compact(array)
console.log(๐ท) // [1, 2, 3, 4, 5]
๐ โจ Grapevine-chan - concat()
๐ ๐ท
Here comes the charming Grapevine-chan! She's here to help you combine arrays into a delightful blend! Let's create some exquisite code together! (ใฅ๏ฝกโโฟโฟโ๏ฝก)ใฅ
import { concat } from 'lamby-chan'
const arr1 = [1, 2, 3]
const arr2 = [4, 5, 6]
const ๐ท = concat(arr1, arr2)
console.log(๐ท) // [1, 2, 3, 4, 5, 6]
๐ โจ Fluffy Cloud-chan - flatten()
๐ โ๏ธ
Introducing the fluffy and light Fluffy Cloud-chan! She's here to help you flatten nested arrays into a smooth and gentle breeze of elements! Let's float into the sky together! เผผ ใค โ_โ เผฝใค
import { flatten } from 'lamby-chan'
const nestedArray = [[1, 2], [3, 4], [5, 6]]
const โ
๏ธ = flatten(nestedArray)
console.log(โ
๏ธ) // [1, 2, 3, 4, 5, 6]
๐ โจ Forest Fairy-chan - flatMap
๐ ๐ณ
Meet our enchanting Forest Fairy-chan! She's here to help you map and flatten your arrays, creating a magical forest of code! Let's explore the whimsical world together! (๏พโใฎโ)๏พ*:๏ฝฅ๏พโง
import { flatMap } from 'lamby-chan'
const ๐ฆ = x => [x, x * 2]
const array = [1, 2, 3, 4]
const ๐ณ = flatMap(๐ฆ, array)
console.log(๐ณ) // [1, 2, 2, 4, 3, 6, 4, 8]
โจ ๐ Special Thanks ๐ โจ
A heartfelt and super kawaii thank you to all the wonderful contributors who helped create and improve Lamby-chan! Your support means the world to us! You're all so sugoi, and we couldn't have done it without you! (เนหแดห)๏ปญ
๐ โจ Extra Special Thanks ๐ โจ
A huge and heartwarming thank you to ChatGPT-chan for helping write the most kawaii README ever! Your moe touch has made our code documentation a delight to read and cherish! You're our shining star, ChatGPT-chan! (เนหฬตแดหฬต)ู
We also want to express our deepest gratitude to Dall-E-chan for creating the cutest mascot we could ever dream of, Lamby-chan! Thanks to your magical art skills, our library is now filled with even more love and adorableness! You've made our world extra kawaii, Dall-E-chan! (โโฟโโฟ)
๐ธ ๐ Licensing and Permissions ๐ ๐ธ
Lamby-chan is licensed under the WTFPL (Do What The Fluff You Want To Public License), because we believe in sharing the cuteness and love with everyone!
Feel free to use, modify, and distribute Lamby-chan in your projects, both personal and commercial! Just remember to always spread love and happiness, and make the world a more kawaii place! (๏ฝก
For more information about the WTFPL, please visit http://www.wtfpl.net/.