New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

symbol-luau

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symbol-luau

A Symbol object to mimic [JavaScript's Symbol type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol).

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
74
-12.94%
Maintainers
1
Weekly downloads
 
Created
Source

Symbol

A Symbol object to mimic JavaScript's Symbol type.

API

Symbol()

Symbol(name: string?): Symbol

Create a new symbol object. Symbols use the newproxy function under the hood to create an opaque, unique sentinel value. The optional string value will be included in value returned by calling tostring on the resulting symbol.

local Foo = Symbol("Foo")
print(tostring(Foo)) -- prints: 'Symbol("Foo")'

Symbol.for_

Symbol.for_(name: string)

Returns globally-shared symbol for the provided name, creating it in a global registry if it has not yet been accessed. Symbol.for_ uses a global registry for the lifetime of the lua execution.

Types

Symbol

Calling Symbol.new returns an object with type Symbol.

License

Licensed under the MIT license (LICENSE.txt or http://opensource.org/licenses/MIT).

FAQs

Package last updated on 08 Dec 2023

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