17 lines
351 B
JavaScript
17 lines
351 B
JavaScript
import {get, set} from "./schedule.js";
|
|
|
|
function easeConstant(id, value) {
|
|
if (typeof value !== "function") throw new Error;
|
|
return function() {
|
|
set(this, id).ease = value;
|
|
};
|
|
}
|
|
|
|
export default function(value) {
|
|
var id = this._id;
|
|
|
|
return arguments.length
|
|
? this.each(easeConstant(id, value))
|
|
: get(this.node(), id).ease;
|
|
}
|