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

fable-core

v0.7.30

Published

Fable core lib & bindings for native JS objects, browser and node APIs

Downloads

225

Readme

fable-core

Fable core lib and bindings for native JS objects, browser and Node APIs

npm Join the chat at https://gitter.im/fable-compiler/Fable

RELEASE NOTES · Follow us on Twitter!

Installation

npm install --save fable-core

Usage

For general information on how to use Fable, please check the documentation.

fable-core uses ES5 syntax but it calls some ES2015 APIs (Symbol, Map, Set...), so you will need a polyfill like core-js to use it in environments that don't support these APIs.

The default distribution uses ES2015 modules in order to produce smaller sizes with bundlers like Rollup (embedded with fable-compiler) or Webpack 2. If you are not bundling your app, you'll probably need the UMD distribution instead (see below).

F# project (.fsproj)

  <ItemGroup>
    <Reference Include="node_modules/fable-core/Fable.Core.dll" />
  </ItemGroup>

F# script (.fsx)

#r "node_modules/fable-core/Fable.Core.dll"

open Fable.Core
open Fable.Import

Usage without bundling

Node

If you're writing a Node application and don't use a module bundler, you just need to instruct fable-compiler to use fable-core UMD distribution by passing --coreLib fable-core/umd among the compiler options.

require.js

If you target the browser and prefer to load JS dependencies asynchronously instead of bundling, you can easily load fable-core files with require.js as follows:

<script src="node_modules/requirejs/require.js"></script>
<script>
requirejs.config({
    paths: {
        'fable-core': 'node_modules/fable-core/umd'
    }
});
</script>