Coder Social home page Coder Social logo

supercharge / arrays Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 0.0 58 KB

Array utilities for Node.js

Home Page: https://superchargejs.com/docs/arrays

License: MIT License

JavaScript 54.65% TypeScript 45.35%
utilities array supercharge nodejs hacktoberfest

arrays's Introduction



Supercharge is a full-stack Node.js framework.


Docs



Follow @marcuspoehls and @superchargejs for updates!


Quick Start

Scaffold a new Supercharge application on your computer using NPM:

npm init @supercharge/app@latest hello-supercharge

This will create a new Supercharge application in a hello-supercharge folder of your current working directory.

About Supercharge

Supercharge is a full-stack Node.js framework — not just a web-framework.

Supercharge builds on top of the Koa HTTP framework. Supercharge refines all Koa handling by providing a streamlined approach to middlewares and routing. You’ll also benefit from a comprehensive application setup containing configuration and database management, logging, integrating with Objection.js and knex.js for a powerful database interaction.

Learning

Supercharge has an extensive documentation that gives you all the information to get started with the framework.

Did you create a tutorial, video, blog post, plugin, library, or anything else related to Supercharge? Please let me know! Create an issue or tweet me @marcuspoehls. I'm very happy to create a content list and share it with everybody!

License

Supercharge is MIT licensed.


superchargejs.com  ·  GitHub @supercharge  ·  Twitter @superchargejs

arrays's People

Contributors

marcuspoehls avatar mcvladthegoat avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

arrays's Issues

Support second argument in `join` defining how the last item should be joined

The idea is to support a second, optional argument in the Arr#join method defining how the last item in the array should be appended.

Examples

Arr.from(['a', 'b', 'c']).join(', ')
// 'a, b, c'

Arr.from(['a', 'b', 'c']).join(', ', ', and ')
// 'a, b, and c'

Arr.from(['a', 'b']).join(', ', ' and ')
// 'a and b'

Arr.from(['a']).join(', ', ' and ')
// 'a'

Arr.from([]).join(', ', ' and ')
// ''

Extend `join` method to support a callback

Extend the Arr#join method to support a callback function as an argument. The callback function receives each item in the array as an argument like map does. The returned value from the callback will then be used to create the resulting string.

Examples

const words = ['Hello', 'Supercharge']

Arr.from(words).join(word => {
  return `Word: "${word}", `
})

// Word: "Hello", Word: "Supercharge",

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.