The @swim/core framework provides a lightweight, portable, dependency-free, and strongly typed baseline on which to build higher level libraries. @swim/core forms the foundation on which the @swim/mesh multiplexed streaming WARP framework, and the @swim/ui real-time user interface toolkits, are built. @swim/core is a part of the broader @swim/system framework.
The @swim/core umbrella package depends on, and re-exports, the following component libraries:
strftime-style parsers and formatters.
@swim/core has no external dependencies.
For an npm-managed project,
npm install @swim/core to make it a dependency.
TypeScript sources will be installed into
node_modules/@swim/core/lib/main. And a pre-built UMD script, which
bundles all @swim/core component libraries, can be found in
Browser applications can load
swim-core.js directly from the SwimOS CDN.
<!-- Development --> <script src="https://cdn.swimos.org/js/latest/swim-core.js"></script> <!-- Production --> <script src="https://cdn.swimos.org/js/latest/swim-core.min.js"></script>
Alternatively, the standalone
swim-system.js script may be loaded
from the SwimOS CDN, which bundles @swim/core together with all other
<!-- Development --> <script src="https://cdn.swimos.org/js/latest/swim-system.js"></script> <!-- Production --> <script src="https://cdn.swimos.org/js/latest/swim-system.min.js"></script>
@swim/core can be imported as an ES6 module from TypeScript and other
ES6-compatible environments. All component libraries are re-exported by
import * as swim from "@swim/core";
@swim/core can also be used as a CommonJS module in Node.js applications.
All component libraries are re-exported by the umbrella
var swim = require("@swim/core");
When loaded by a web browser, the
swim-core.js script adds all component
library exports to the global
swim-system.js script also adds all @swim/core component library
exports to the global
swim namespace, making it a drop-in replacement
swim-core.js when additional @swim/system frameworks are needed.
Generated using TypeDoc