lamby-chan

1.0.0ย โ€ขย Publicย โ€ขย Published

๐ŸŒธ Lamby-chan's Moe Moe Kun Maid Cafรฉ Library ๐ŸŒธ

lamby-chan 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/.

Readme

Keywords

none

Package Sidebar

Install

npm i lamby-chan

Weekly Downloads

0

Version

1.0.0

License

WTFPL

Unpacked Size

1.07 MB

Total Files

7

Last publish

Collaborators

  • codevinsky