Skip to content

Instantly share code, notes, and snippets.

@storytime storytime/fk.js
Created Apr 21, 2014

What would you like to do?
RequireJS Example
define(function () {
return function (s) {
return s.toUpperCase();
<!DOCTYPE html>
<title>My Sample Project</title>
<!-- data-main attribute tells require.scripts to load
scripts/main.scripts after require.scripts loads. -->
<script data-main="scripts/main" src=""></script>
<h1>My Sample Project</h1>
require(["helper/fk", "helper/values"], function (fk,val) {
//This function is called when scripts/helper/values.js is loaded.
//If values.js calls define(), then this function is not fired until
//util's dependencies have loaded, and the util argument will hold
//the module value for "helper/util".
console.log("from values.js " +
console.log("from fk.ks " + fk("string"))
define (
red: "red",
green: "green",
black: "black"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.