TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Essential functions in JavaScript in vanilla form (inspired by PHP)

5 pointsby amitmerchantover 7 years ago

3 comments

onion2kover 7 years ago
Javascript has array_map called Array.prototype.map(), it has an array_merge method called Array.prototype.concat(), array_reject can be achieved using Array.prototype.filter() and so on. These functions are a poor reimplementation of some native features.
评论 #15293242 未加载
krappover 7 years ago
Why not actually push a .js file instead of just examples in a readme?<p>Or, I guess the modern method would be why not publish every line of every function as a separate NPM package?
drivingmenutsover 7 years ago
Well, there&#x27;s always this: <a href="http:&#x2F;&#x2F;locutus.io&#x2F;php&#x2F;" rel="nofollow">http:&#x2F;&#x2F;locutus.io&#x2F;php&#x2F;</a><p>PHP functions written in Javascript. Been around for quite a while, actually.