lamby-chan
v1.0.0
Published
๐ธ Lamby-chan's adorable little moe moe algebraic ฮป functions that just can't wait to help you with whatever you may need. ~nyaaaaa!!! ๐ธ
Downloads
2
Readme
๐ธ 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! (โโฟโโฟ) ๐
๐๐ To both ChatGPT-chan and Dall-E-chan, thank you for being our cute companions and making the Lamby-chan library a place filled with joy, cuteness, and wonder! ๐๐
๐ธ๐ 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/.