This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
especially with all
npm packages installed. Try it out:
especially lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Especially has a small-but-growing collection of meta-textual and abstract operations drawn directly from the pages of the ECMAScript 2015 draft specification. From common things like Get to dealing with internal slots, Especially has you covered.
Especially has no main module (gasp). Instead, you'll require one of the top-level modules that contain the stuff you want.
A variety of math operations from the Algorithm Conventions section of the spec:
assert: ensures you pass it a boolean, then throws if it's not true
define_built_in_data_property: a shortcut for defining a built-in data property with the usual property descriptor.
make_slots(object, arrayOfSlotNames): call this to initialize an object's internal slots. Often referenced in the spec as "instances of (something) are initially created with the internal slots listed in (some table)."
get_slot(object, name): get the value of an internal slot. Often referenced in the spec as "the value of (object)'s [[SlotName]] internal slot."
set_slot(object, name): set the value of an internal slot. Often referenced in the spec as "Set (object)'s [[SlotName]] internal slot to (a value)."
has_slot(object): check whether an object has an internal slot with the given name. Often referenced in the spec as "If (object) does not have a [[SlotName]] internal slot."
One well-known symbol is included:
"@@iterator"will give you a symbol that is used by GetIterator. (It is the same as V8's default
"@@species"will give the symbol that is used by SpeciesConstructor. (It is a freshly-minted symbol, since V8 doesn't have
Some of the well-known intrinsic objects are included by name, e.g.
"%ObjectPrototype%". These are used by GetPrototypeFromConstructor and related operations.
Especially is meant to run in io.js (not Node.js™). It uses certain ES2015 features only implemented in modern V8.
Install it from npm into your project with
npm install especially.
You can see examples of it in use in the reference implementation of the ES2015 promises specification.