/Pea

php functions in javascript

Primary LanguageJavaScript

Pea

2015-10-26 -> 2021-03-05

Php like functions in js.

Pea is part of the universe framework.

Install

Using the planet installer via light-cli

lt install Ling.Pea

Using the uni command.

uni import Ling/Pea

Why the name pea?

Because p like in php.

Most functions come from the phpjs library.

How to use?

  1. Include the pea.js file in your header.
  2. Now the pea object is available globally, so you can use its methods.

Example:

var fun = function(){
    alert("Is that fun?");
};

if( true === pea.isFunction(fun)){
    fun();
}

Functions

bool inArray ( str:needle, arrayOrObject:haystack, bool:strict=true )

bool isArray ( mixed )

bool isArrayObject ( mixed )

bool isArrayOrObject ( mixed )

bool isFunction ( mixed )

bool nl2br ( str:str, bool:is_xhtml )

History Log

  • 1.2.4 -- 2021-05-31

    • Removing trailing plus in lpi-deps file (to work with Light_PlanetInstaller:2.0.0 api
  • 1.2.3 -- 2021-03-05

    • update README.md, add install alternative
  • 1.2.2 -- 2020-12-08

    • Fix lpi-deps not using natsort.
  • 1.2.1 -- 2020-12-04

    • Add lpi-deps.byml file
  • 1.2.0 -- 2016-01-09

    • add nl2br method
  • 1.1.0 -- 2015-12-11

    • add inArray method
  • 1.0.0 -- 2015-10-26

    • initial commit