Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lopatnov/namespace

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lopatnov/namespace

Demonstrates a sample library template

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@lopatnov/namespace

npm NPM version License GitHub issues GitHub forks GitHub stars GitHub top language

build-and-test-package publish-npm-package Libraries.io dependency status for latest release

Patreon Twitter LinkedIn

Dynamic namespace creation

Install

https://nodei.co/npm/@lopatnov/namespace.png?downloads=true&downloadRank=true&stars=true

npm install @lopatnov/namespace

Browser

<script src="//lopatnov.github.io/namespace/dist/namespace.min.js"></script>

Import package to the project

TypeScript

import Namespace from "@lopatnov/namespace";

JavaScript

var Namespace = require("@lopatnov/namespace");

How to use

window.globalSpace = new Namespace('Eeny.meeny.miny.moe[Catch][a][tiger][by][the][toe]');
var x = new Namespace('Games.World');
var y = {};
var z = x.goto('Games.World');

x.applyTo(y, 'Hello');
console.log(z === y.Hello.Games.World); // true

Demo

See, how it's working: https://runkit.com/lopatnov/namespace

Test it with a runkit: https://npm.runkit.com/@lopatnov/namespace

Rights and Agreements

License Apache-2.0

Copyright 2020 Oleksandr Lopatnov

Keywords

FAQs

Package last updated on 10 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc