annotate modules/foo.js @ 6:97adec8c8127

Now passing all CommonJS SecurableModule compliance tests.
author Atul Varma <varmaa@toolness.com>
date Thu, 10 Sep 2009 01:04:04 -0700
parents ae5869491e61
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
1 print('loading foo');
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
2
1
ab09b8a10876 Added trivial half-baked implementation of securable modules.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
3 exports.bar = function bar() {
ab09b8a10876 Added trivial half-baked implementation of securable modules.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
4 print('hay!');
ab09b8a10876 Added trivial half-baked implementation of securable modules.
Atul Varma <varmaa@toolness.com>
parents:
diff changeset
5 };
2
b6f9d743a2b5 Refined require() implementation.
Atul Varma <varmaa@toolness.com>
parents: 1
diff changeset
6
4
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
7 exports.hello = 1;
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
8
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
9 require('baz').blop();
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
10
ae5869491e61 Added more to securablemodule impl.
Atul Varma <varmaa@toolness.com>
parents: 2
diff changeset
11 print('foo loaded.');