Skip to main content

Fanstatic package providing a small js library for declaring namespaces.

Project description

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.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

js.namespace-0.1.zip (9.7 kB view details)

Uploaded Source

File details

Details for the file js.namespace-0.1.zip.

File metadata

  • Download URL: js.namespace-0.1.zip
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for js.namespace-0.1.zip
Algorithm Hash digest
SHA256 17c2a02d488bf601ea19c539cb57878c135285ddf7290649b28514aaacd5f6d9
MD5 fb0dd21df7c1f1fdcdd6fae0bda63106
BLAKE2b-256 e64504b02cce33ba69a896b4735b22324cc512787257690e7d9861f2fd6a80a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page