Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coffeescript

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffeescript

Unfancy JavaScript

  • 2.7.0
  • next
  • latest
  • stable
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
increased by2.2%
Maintainers
3
Weekly downloads
 
Created

What is coffeescript?

CoffeeScript is a programming language that transcompiles to JavaScript. It provides a more concise syntax, additional features not present in JavaScript, and aims to enhance readability and brevity of code. It can be used for server-side scripting with Node.js or client-side scripting in web browsers.

What are coffeescript's main functionalities?

Simplified Syntax

CoffeeScript offers a more readable and expressive syntax compared to JavaScript. This code sample defines a function to square a number using an arrow function and without the need for curly braces or the 'function' keyword.

square = (x) -> x * x

Classes and Inheritance

CoffeeScript supports classes and inheritance, allowing for more structured and object-oriented code. This code sample defines an Animal class and a Dog class that inherits from it, with a constructor and a method.

class Animal
  constructor: (@name) ->
class Dog extends Animal
  bark: -> 'Woof! I am ' + @name

List Comprehensions

CoffeeScript provides list comprehensions, which are a concise way to apply operations to the elements of a collection. This code sample demonstrates creating a new array of cubes from an existing array of numbers.

cubes = (math.cube num for num in list)

Destructuring Assignment

Destructuring assignment syntax in CoffeeScript allows for unpacking values from arrays or properties from objects into distinct variables. This code sample shows how to extract the 'name' and 'value' properties from an object.

{name, value} = object

Other packages similar to coffeescript

Keywords

FAQs

Package last updated on 24 Apr 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc