UNPKG

php.js

Version:

Use phpjs functions as required.

14 lines (12 loc) 473 B
exports.current=require("./current"); module.exports=function(){ return pos.apply(exports,arguments) }; function pos(arr) { // discuss at: http://phpjs.org/functions/pos/ // original by: Brett Zamir (http://brett-zamir.me) // note: Uses global: php_js to store the array pointer // depends on: current // example 1: transport = ['foot', 'bike', 'car', 'plane']; // example 1: pos(transport); // returns 1: 'foot' return this.current(arr); }