MCPcopy Index your code
hub / github.com/getify/Functional-Light-JS / formatStockNumbers

Function formatStockNumbers

ch11-code/stock-ticker-events.js:27–38  ·  view source on GitHub ↗
(stock)

Source from the content-addressed store, hash-verified

25}
26
27function formatStockNumbers(stock) {
28 var stockDataUpdates = [
29 [ "price", formatPrice( stock.price ) ],
30 [ "change", formatChange( stock.change ) ]
31 ];
32
33 return reduce( function formatter(stock,[propName,val]){
34 return setProp( propName, stock, val );
35 } )
36 ( stock )
37 ( stockDataUpdates );
38}
39
40function formatSign(val) {
41 if (Number(val) > 0) {

Callers

nothing calls this directly

Calls 1

setPropFunction · 0.85

Tested by

no test coverage detected