Action Comedy Crime. Director Michael Dowse. Shane Mack. Ed Helms Taraji P. Henson Terrence Little Gardenhigh. Top credits Director Michael Dowse. See more at IMDbPro. Trailer Official Trailer. Photos Top cast Edit. Ed Helms Coffee as Coffee. Taraji P. Henson Vanessa Manning as Vanessa Manning. Terrence Little Gardenhigh Kareem as Kareem. Andrew Bachelor Rodney as Rodney. Serge Houde Jerome as Jerome. Chance Hurstfield Dominic as Dominic. Diana Bang Ms.
Chu as Ms. Erik McNamee Gary as Gary. Arielle Tuliao Sharon as Sharon. Michael Dowse. More like this. Watch options. Storyline Edit. Henson , her beloved year-old son Kareem Terrence Little Gardenhigh plots their break-up. Attempting to scare away his mom's boyfriend for good, Kareem tries to hire criminal fugitives to take him out but accidentally exposes a secret network of criminal activity, making his family its latest target.
Racking up over a century of combined experience between them they all came with a wide array of ideas on how things should be done. What if you didn't have to spend hundreds of thousands on unnecessary infrastructure and a huge footprint? What if, instead, you committed a smaller investment, tookadvantage of modern technology, and passed those savings back to your clients? Using innovations in technology they equipped themselves with a huge Smoke capacity by deploying the software on high-end Macs.
This, used in partnership with cloud technology and floating licenses, provides a flexible and scalable set-up. And naturally they wanted to partner up with a technology supplier that could match their drive as well as their needs. Which is where Escape Technology comes in. A new Bristol satellite studio was the first on the list of requirements. But that meant having, essentially, a whole new studio set up. CoffeeScript 2 generates JavaScript that uses the latest, modern syntax.
The runtime or browsers where you want your code to run might not support all of that syntax. See Build Tools. To make things easy, CoffeeScript has built-in support for the popular Babel transpiler. You can use it via the --transpile command-line option or the transpile Node API option. You need to provide it with a configuration so that it knows what to do. One way to do this is by creating a. Babel supports other ways , too.
A minimal. This lets you use transpilers other than Babel, and it gives you greater control over the process. There are many great task runners for setting up JavaScript build chains, such as Gulp , Webpack , Grunt and Broccoli. CoffeeScript itself will output Array. This reference is structured so that it can be read from top to bottom, if you like.
Later sections use ideas and syntax previously introduced. Familiarity with JavaScript is assumed. In all of the following examples, the source CoffeeScript is provided on the left, and the direct compilation into JavaScript is on the right. The CoffeeScript on the left is editable, and the JavaScript will update as you edit.
First, the basics: CoffeeScript uses significant whitespace to delimit blocks of code. The implicit call wraps forward to the end of the line or block expression. Functions are defined by an optional list of parameters in parentheses, an arrow, and the function body. Functions may also have default values for arguments, which will be used if the incoming argument is missing undefined. Like JavaScript and many other languages, CoffeeScript supports strings as delimited by the " or ' characters.
Single-quoted strings are literal. You may even use interpolation in object keys. Multiline strings are allowed in CoffeeScript. Lines are joined by a single space unless they end with a backslash. Indentation is ignored. The indentation level that begins the block is maintained throughout, so you can keep it all aligned with the body of your code. The CoffeeScript literals for objects and arrays look very similar to their JavaScript cousins.
When each property is listed on its own line, the commas are optional. Objects may be created using indentation instead of explicit braces, similar to YAML. CoffeeScript has a shortcut for creating objects when you want the key to be set with a variable of the same name. In CoffeeScript, comments are denoted by the character to the end of a line, or from to the next appearance of. Comments are ignored by the compiler, though the compiler makes its best effort at reinserting your comments into the output JavaScript after compilation.
The CoffeeScript compiler takes care to make sure that all of your variables are properly declared within lexical scope — you never need to write var yourself. Notice how all of the variable declarations have been pushed up to the top of the closest scope, the first time they appear. This safety wrapper, combined with the automatic generation of the var keyword, make it exceedingly difficult to pollute the global namespace by accident. The safety wrapper can be disabled with the bare option , and is unnecessary and automatically disabled when using modules.
This is intentional ; we feel that the simplicity gained by not having to think about variable declaration outweighs the benefit of having three separate ways to declare variables. As with functions and other block expressions, multi-line conditionals are delimited by indentation.
CoffeeScript can compile if statements into JavaScript expressions, using the ternary operator when possible, and closure wrapping otherwise. There is no explicit ternary statement in CoffeeScript — you simply use a regular if statement on a single line. The JavaScript arguments object is a useful way to work with functions that accept variable numbers of arguments.
CoffeeScript provides splats ES adopted this feature as their rest parameters. Comprehensions replace and compile into for loops, with optional guard clauses and the value of the current array index. Unlike for loops, array comprehensions are expressions, and can be returned and assigned. Note how because we are assigning the value of the comprehensions to a variable in the example above, CoffeeScript is collecting the result of each iteration into an array.
Sometimes functions end with loops that are intended to run only for their side-effects. Comprehensions can also be used to iterate over the keys and values in an object. Use of to signal comprehension over the properties of an object instead of the values in an array. If you would like to iterate over just the keys that are defined on the object itself, by adding a hasOwnProperty check to avoid properties that may be inherited from the prototype, use for own key, value of object.
To iterate a generator function, use from. See Generator Functions. The only low-level loop that CoffeeScript provides is the while loop. The main difference from JavaScript is that the while loop can be used as an expression, returning an array containing the result of each iteration through the loop. For readability, the until keyword is equivalent to while not , and the loop keyword is equivalent to while true.
CoffeeScript provides the do keyword, which immediately invokes a passed function, forwarding any arguments. Ranges can also be used to extract slices of arrays. With two dots Slices indices have useful defaults. An omitted first index defaults to zero and an omitted second index defaults to the size of the array.
The same syntax can be used with assignment to replace a segment of an array with new values, splicing it. The CoffeeScript compiler tries to make sure that all statements in the language can be used as expressions.
Watch how the return gets pushed down into each possible branch of execution in the function below. Things that would otherwise be statements in JavaScript, when used as part of an expression in CoffeeScript, are converted into expressions by wrapping them in a closure. This lets you do useful things, like assign the result of a comprehension to a variable:. As in YAML , on and yes are the same as boolean true , while off and no are boolean false. You can use in to test for array presence, and of to test for JavaScript object-key presence.
In a for loop, from compiles to the ES of. Note that if the compiler knows that a is in scope and therefore declared, a? The reverse also holds for not a?
If a variable might be undeclared, the compiler does a thorough check. This is what JavaScript coders should be typing when they want to check if a mystery variable exists. The accessor variant of the existential operator?. Use it instead of the dot accessor. When you assign an array or object literal to a value, CoffeeScript breaks up and matches both sides against each other, assigning the values on the right to the variables on the left.
In the simplest case, it can be used for parallel assignment:. Destructuring assignment can be used with any depth of array and object nesting, to help pull out deeply nested properties. Expansion can be used to retrieve elements from the end of an array without having to assign the rest of its values. It works in function parameter lists as well. Destructuring assignment is also useful when combined with class constructors to assign properties to your instance from an options object passed to the constructor.
The above example also demonstrates that if properties are missing in the destructured object or array, you can, just like in JavaScript, provide defaults. Note though that unlike with the existential operator, the default is only applied with the value is missing or undefined — passing null will set a value of null , not the default.
In JavaScript, the this keyword is dynamically scoped to mean the object that the current function is attached to. If you pass a function as a callback or attach it to a different object, the original value of this will be lost. This is helpful when using callback-based libraries like Prototype or jQuery, for creating iterator functions to pass to each , or event-handler functions to use with on. CoffeeScript supports ES generator functions through the yield keyword.
Similar to how yield return forces a generator, await return may be used to force a function to be async. CoffeeScript 1 provided the class and extends keywords as syntactic sugar for working with prototypal functions. Finally, class definitions are blocks of executable code, which make for interesting metaprogramming possibilities.
In the context of a class definition, this is the class object itself; therefore, you can assign static properties by using property: value. In addition to supporting ES classes, CoffeeScript provides a shortcut for working with prototypes. You need to remember to break at the end of every case statement to avoid accidentally falling through to the default case.
CoffeeScript prevents accidental fall-through, and can convert the switch into a returnable, assignable expression. The format is: switch condition, when clauses, else the default case. As in Ruby, switch statements in CoffeeScript can take multiple values for each when clause.
If any of the values match, the clause runs. The catch part may also omit the error parameter if it is not needed. CoffeeScript borrows chained comparisons from Python — making it easy to test if a value falls within a certain range.
Similar to block strings and comments, CoffeeScript supports block regexes — extended regular expressions that ignore internal whitespace and can contain comments and interpolation. To quote from the CoffeeScript source:. CoffeeScript supports ES tagged template literals , which enable customized string interpolation. The function can then assemble these parts into an output string, providing custom string interpolation.
ES modules are supported in CoffeeScript, with very similar import and export syntax:. Dynamic import is also supported, with mandatory parentheses:. Note that the CoffeeScript compiler does not resolve modules ; writing an import or export statement in CoffeeScript will produce an import or export statement in the resulting output. Because the runtime is evaluating the generated output, the import statements must reference the output files; so if file.
Also, any file with an import or export statement will be output without a top-level function safety wrapper ; in other words, importing or exporting modules will automatically trigger bare mode for that file. This is because per the ES spec, import or export statements must occur at the topmost scope. You can also embed blocks of JavaScript using triple backticks. While conceived for React , it is not specific to any particular library or framework.
CoffeeScript supports interspersed XML elements, without the need for separate plugins or special settings. CoffeeScript does not output React. It is up to you to attach another step in your build chain to convert this JSX to whatever function calls you wish the XML elements to compile to. They also often used a. CoffeeScript does not do any type checking itself; the JavaScript output you see above needs to get passed to Flow for it to validate your code.
If you configure your build chain to compile CoffeeScript and pass the result to Flow in-memory, you can get better performance than this example; and a proper build tool should be able to watch your CoffeeScript files and recompile and type-check them for you on save. If you know of another way to achieve static type checking with CoffeeScript, please create an issue and let us know.
If you name your file with a. Code blocks must also be separated from comments by at least one blank line. Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it as a document , raw , and properly highlighted in a text editor. CoffeeScript includes support for generating source maps, a way to tell your JavaScript engine what part of your CoffeeScript program matches up with the code being evaluated.
Browsers that support it can automatically use source maps to show your original source code in the debugger. To generate source maps alongside your JavaScript files, pass the --map or -m flag to the compiler.
0コメント