/src/clojure/monger/js.clj
Clojure | 50 lines | 9 code | 6 blank | 35 comment | 0 complexity | e2f12debf4a08889f56bc123b1c33136 MD5 | raw file
- ;; This source code is dual-licensed under the Apache License, version
- ;; 2.0, and the Eclipse Public License, version 1.0.
- ;;
- ;; The APL v2.0:
- ;;
- ;; ----------------------------------------------------------------------------------
- ;; Copyright (c) 2011-2018 Michael S. Klishin, Alex Petrov, and the ClojureWerkz Team
- ;;
- ;; Licensed under the Apache License, Version 2.0 (the "License");
- ;; you may not use this file except in compliance with the License.
- ;; You may obtain a copy of the License at
- ;;
- ;; http://www.apache.org/licenses/LICENSE-2.0
- ;;
- ;; Unless required by applicable law or agreed to in writing, software
- ;; distributed under the License is distributed on an "AS IS" BASIS,
- ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ;; See the License for the specific language governing permissions and
- ;; limitations under the License.
- ;; ----------------------------------------------------------------------------------
- ;;
- ;; The EPL v1.0:
- ;;
- ;; ----------------------------------------------------------------------------------
- ;; Copyright (c) 2011-2018 Michael S. Klishin, Alex Petrov, and the ClojureWerkz Team.
- ;; All rights reserved.
- ;;
- ;; This program and the accompanying materials are made available under the terms of
- ;; the Eclipse Public License Version 1.0,
- ;; which accompanies this distribution and is available at
- ;; http://www.eclipse.org/legal/epl-v10.html.
- ;; ----------------------------------------------------------------------------------
- (ns monger.js
- "Kept for backwards compatibility. Please use clojurewerkz.support.js from now on."
- (:require [clojurewerkz.support.js :as js]))
- ;;
- ;; API
- ;;
- (defn load-resource
- "Loads a JavaScript resource (file from the classpath) and returns its content as a string.
- The .js suffix at the end may be omitted.
- Used primarily for map/reduce queries."
- (^String [^String path]
- (js/load-resource path)))