Skip to main content

js.namespace

Introduction

This library provides a small javascript library to declare namespaces, packaged for fanstatic.

Create and use a namespace

Once included, you can use namespace.declare(‘your.namespace’); to declare a namespace. Then you can bind objects to that namespace by just assigning them like your.namespace.your_funky_function = function(foo) {…};

You are then able to access these objects from anywhere, without polluting the global scope. Using dotted namespaces is a well known pattern to get a nice and tidy codebase.

How to use?

You can import namespace from js.namespace and need it where you want these resources to be included on a page:

>>> from js.namespace import namespace
>>> namespace.need()

CHANGES

0.1 (2013-05-15)

  • Initial release.

Release files for js.namespace 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for js.namespace 0.1
File Size Uploaded
js.namespace-0.1.zip 9.7 kB Details

Release files / js.namespace-0.1.zip

Download URL js.namespace-0.1.zip
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
17c2a02d488bf601ea19c539cb57878c135285ddf7290649b28514aaacd5f6d9
BLAKE2b-256 checksum
How to use checksums
e64504b02cce33ba69a896b4735b22324cc512787257690e7d9861f2fd6a80a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page