Giter Site home page Giter Site logo

topogigiovanni / underbar.php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emonkak/underbar.php

0.0 2.0 0.0 1.3 MB

This library is deprecated, please use emonkak/collection

Home Page: https://github.com/emonkak/php-collection

License: MIT License

Makefile 0.16% PHP 99.84%

underbar.php's Introduction

Underbar.php Build Status

Underbar.php is a collection processing library for PHP, like underscore.js.

However not aim full compatibility of undersocre.js.

Requirements

Licence

MIT Licence

Getting Started

  1. Install Composer.
  2. Create the composer.json
  3. Execute composer.phar install

composer.json

{
    "require": {
        "emonkak/underbar.php": "dev-master"
    }
}

Example

// There are also ArrayImpl and GeneratorImpl.
use Underbar\IteratorImpl as _;

// Take five elements from a infinite list of even numbers.
_::chain(0)
    ->iterate(function($n) { return $n + 1; })
    ->filter(function($n) { return $n % 2 === 0; })
    ->take(5)
    ->each(function($n) { echo $n, PHP_EOL; });
// => 0
//    2
//    4
//    6
//    8

// Get a first element.
echo _::first(array(100)), PHP_EOL;
// => 100

API Reference

See http://emonkak.github.io/underbar.php/

underbar.php's People

Contributors

emonkak avatar genzouw avatar sasezaki avatar

Watchers

 avatar  avatar

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.