npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

asJam

v0.1.6

Published

A jam of ActionScript

Downloads

234

Readme

asJam, a jam of ActionScript

asJam converts ActionScript 3 source code into Spaceport-compatible JavaScript source code.

asJam is copyright (c) 2011-2012 spaceport.io, Inc.; see LICENSE for details.

Setting up

Binary dependencies:

  • Node.JS 0.4.x, 0.6.x

To install:

npm install

To test:

npm test
# or
make test

About

The converter does not completely convert source code. Some manual work will be required to complete a port of an ActionScript 3 game to Spaceport. The conversion tool is designed to relieve developers of performing the many mundane tasks involved in porting a project to a different language, including:

  • Converting AS3 packages into Spaceport modules.
  • Converting AS3 classes into Spaceport classes.
  • Removing type annotations.
  • Inserting this. in front of member variable and property references.
  • Inserting sp. in front of Spaceport classes.

Again, do not expect automatically-converted code to work without modification. Developers will need to test, debug, and modify converted code manually.

Supported features

  • Classes

    • Static properties and constants

    • Static methods

    • Member properties and constants
      Note: If you call super in a constructor explicitly, properties of superclasses will not be assigned until super is called.

    • Member functions

      • Implicit this. (via a self alias)
      • super
    • Constructors

      • super
      • Implicit super
    • Getter and setter functions

      • super
    • Dynamic classes

    • Visibility (private, protected, public)

    • Internal package classes

  • Functions

    • Optional arguments
    • Rest (...rest) arguments
    • arguments array
  • Packages

    • import com.co
    • import com.*
    • Implicit imports from same package and global package
    • Importing a flash package
    • Partial support for fully-qualified names
  • Binary operators

    • +, -, *, /, %
    • =, +=, -=, *=, /=, %=
    • <<, >>, >>>, &, |, ^
    • <<=, >>=, >>>=, &=, |=, ^=
    • ==, !=, ===, !==
    • >, <, >=, <=
    • &&, ||
    • &&=, ||=
    • in, instanceof, is, as
    • Array access
    • Comma operator
    • Dot access
    • Type operator (:)
  • Unary operators

    • +, -
    • ++, --
    • ~, !
    • new, delete
    • typeof, void
  • Ternary operators

    • ?:
  • Flow control

    • if, for, while, do-while
    • for-in, for-each
    • with
    • try-catch-finally
    • function
  • Literals

    • Number literals (0.9992, 1.42e20, NaN, Infinity, -Infinity)
    • String literals ("a\nb")
    • Array literals ([ a, b ])
    • Object literals ({ a: b })
    • Boolean literals (true, false)
    • RegExp literals (/regexp/gi)
    • null
  • Global types

    • * type
    • Number, String, Array, Object, Boolean
    • Date, RegExp
  • Other features

    • Vector.<>
    • Comments (// and /* */)
    • trace
    • Casting
  • Specific conversions

    • Use of flash.system.Security is removed (with a warning).
    • com.adobe.serialization.JSON and friends are replaced with classes using the native JavaScript (and Flash 11+) JSON class.

Unsupported features

Using the following features may result in non-working code or may not allow a project to be converted at all. In other words, the conversion may be unsuccessful.

The following features will cause a crash and will not convert at all:

  • XML classes and syntax

    • ::, {}, [], +, +=, @, .., ., <>
  • Proxy classes (flash.utils.Proxy)

  • Internal package classes

  • Package function exports

  • Static constructors

The following features may produce improperly-functioning code and will likely require manual modifications:

  • Namespaces
  • flash.utils.Dictionary
  • Interfaces
  • int, uint; all numbers are treated as floating-point numbers except upon declaration
  • Class class
  • Metadata tags (e.g. [Embed])
  • flash.utils, unless otherwise specified
  • Naming conflicts requiring fully-qualified names