# FuncJS

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/FuncJS
> Markdown URL: https://mediated.wiki/source/FuncJS.md
> Source: https://en.wikipedia.org/wiki/FuncJS
> Source revision: 1185235208
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Open-source functions only JavaScript library

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages) This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources. Find sources: "FuncJS" – news · newspapers · books · scholar · JSTOR (July 2014) (Learn how and when to remove this message) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "FuncJS" – news · newspapers · books · scholar · JSTOR (July 2014) (Learn how and when to remove this message) (Learn how and when to remove this message)

FuncJS Original author Sharikul Islam Developer Sharikul Islam Release November 1, 2012 (2012-11-01) Stable release 1 / February 2013 (2013-02) Written in JavaScript Size 4.84 KB zipped / 10.4 KB (uncompressed) Type JavaScript library License Open-source Website funcjs.webege.com

**FuncJS** is an [open-source](/source/Open-source_software) functions only [JavaScript library](/source/JavaScript_library) that aims to speed up web development time in the [JavaScript](/source/JavaScript) programming language by providing **22** pre-written functions made available throughout both releases. FuncJS is intended to allow JavaScript programmers to get the basic areas completed quickly, and let them focus on more larger, code-centric areas of development. As of November 2012, FuncJS is a relatively new product and is in version one of its stable release.

## Functions

In January 2013, FuncJS 2 was released which got rid of many functions, and renamed some functions. However, the new files were uploaded onto [GitHub](/source/GitHub), but it's a temporary action, as according to the repository's README file. Here's the new list, as according to the new documentation:

- echo()

- function_exists()

- strlen()

- strpos()

- str_replace()

- up()

- down()

- store()

- str_rev()

- grab()

- trim()

- count()

- strip_tags()

- show_tags()

## Importing FuncJS to webpages

FuncJS is available in two versions; minified (compressed) and an uncompressed version,[1] both of which are to be used separately from each other. Similar to other JavaScript libraries, FuncJS can be imported onto a webpage by including it via the "script" [HTML](/source/HTML) tag:

<script src="http://funcjs.webege.com/funcJS-min.js"></script>

According to the documentation, users should make sure FuncJS is loaded and working properly on their webpages by checking whether the browser recognises the FuncJS object:

if (window.funcJS) {
  alert("I'm working!");
} else {
  alert("I'm not working!");
}

Both versions of FuncJS are hosted by FuncJS itself, as demo's suggest that FuncJS is only available through their servers. However, although FuncJS allows users to download a local copy of the file to their own machines, it deeply encourages that users import FuncJS into their webpages through linking it via a [URL](/source/Uniform_resource_locator) as "this ensures that you (the user) have any new updates to the file made available to you."

## Using FuncJS in webpages

Since function's from FuncJS are seen by the browser as regular functions, they would have to be written within "script" tags and would be checked and executed by the browser's JavaScript engine (such as [Google Chrome](/source/Google_Chrome)'s V8 JavaScript Engine). As seen by the documentation's, function's from FuncJS are designed to fit into normal JavaScript code, therefore not breaking the "flow" of writing JavaScript code. Take this example (from the documentation website[2]):

if (3 < 4) {
  echo("That's correct!");
} else {
  echo("What?!!!");
}

which checks a given condition, and displays text depending on the outcome. As seen by the example, the "echo" function can be considered as a part of JavaScript, similar to [PHP](/source/PHP).

## References

1. **[^](#cite_ref-1)** ["Get Started"](http://docs.funcjs.webege.com/Get-Started.html). Retrieved 2012-11-12.

1. **[^](#cite_ref-2)** ["echo()"](http://docs.funcjs.webege.com/echo().html). Retrieved 2012-11-11.

---
Adapted from the Wikipedia article [FuncJS](https://en.wikipedia.org/wiki/FuncJS) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/FuncJS?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
