cssVar.js 583 B

1234567891011121314151617181920212223
  1. "use strict";
  2. /**
  3. * Copyright (c) 2013-present, Facebook, Inc.
  4. *
  5. * This source code is licensed under the MIT license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. *
  8. */
  9. var fbCSSVars = require("fbjs-css-vars");
  10. var invariant = require("./invariant");
  11. /**
  12. * @param {string} name
  13. */
  14. function cssVar(name) {
  15. !Object.prototype.hasOwnProperty.call(fbCSSVars, name) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Unknown key passed to cssVar: %s.', name) : invariant(false) : void 0;
  16. return fbCSSVars[name];
  17. }
  18. module.exports = cssVar;